Find Distance to Decision Boundary in Decision Trees

前端 未结 2 693
北荒
北荒 2021-01-15 13:12

I want to find the distance of samples to the decision boundary of a trained decision trees classifier in scikit-learn. The features are all numeric and the feature space co

2条回答
  •  时光说笑
    2021-01-15 14:06

    Decision tree does not learn to draw a decision boundary. It tries to split the tree based on the maximum information gain point. For this process, decision tree algorithm uses entropy or gini indexes.

    Because of this reason, you cannot find the distance between the points and the decision boundary( there is no decision boundary).

    If you want you can calculate the distance between the points and the lines that you draw on graphic. So it approximately gives some results.

提交回复
热议问题