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
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.