Splitting in Decision tree

自闭症网瘾萝莉.ら 提交于 2020-06-17 07:38:29

问题


If the input to any node of tree is the shown data, what will be the best split? Any split will have lesser children's accuracy than parent's accuracy, right? So even accuracy is decreasing will we go on splitting?


回答1:


Without getting the specific data, this is hard to answer

But simulating a similiar data can give the rough idea. Here's a tree for such data with max_depth of 3

The first split takes all the white dots on the right, and classifies them.

The second split takes all the white dots to the left, and classifies the,.

The third splits tries to split between the black points and the white points in the middle, by spliting across the y (X[1]) axis

For the first split, notice that total gini is now 0.448*1512/2000 + 0.0 * 488/2000 =0.34<0.5. The accuracy after that split is about 75%, because it is right on 100% of 25% of the data, and 66% on 75% of the data.



来源:https://stackoverflow.com/questions/61364693/splitting-in-decision-tree

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!