Reputation: 84
Say I have n
training samples and a binary classification task. I want to train a decision tree of smallest possible depth and having fewest possible total nodes such that the training accuracy on these n
samples is 100%. In the worst case, this would mean that I have one leaf node per sample. Is there some configuration of parameters in Scikit-Learn's implementation [1] of the DecisionTreeClassifier
that would let me achieve this?
Upvotes: 0
Views: 601
Reputation: 2111
Answer
By reading the documentation you get your answer.
If you dont set a limit to max_depth
the tree will keep expanding to the deepest leaf.
Also you can check here similar question.
Upvotes: 1