MachineLearning icon indicating copy to clipboard operation
MachineLearning copied to clipboard

decision Tree 有bug 啊

Open weishengkui opened this issue 6 years ago • 0 comments

def _createTree(self,X,y,featureIndex): 有一个返回分支 #所有label都相同的话,则停止分割,返回该label if labelList.count(labelList[0]) == len(labelList): return labelList[0] 当输入数据所有的类别都相同的时候,myTree 被y值覆盖了。

weishengkui avatar May 01 '18 16:05 weishengkui