Issue
How to extract the depth and number of leaves of the learned tree of DecisionTreeClassifier in scikit-learn?
https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html
Solution
Depth of learned tree and number of leaves can be extracted using clf.get_depth()
and clf.get_n_leaves()
functions respectively.
Answered By - Kiran Ramesh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.