1
votes

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][1]

1
I realized depth of learned tree and number of leaves can be extracted using clf.get_depth() and clf.get_n_leaves functions respectivelyKiran Ramesh

1 Answers

0
votes

I realized depth of learned tree and number of leaves can be extracted using clf.get_depth() and clf.get_n_leaves() functions respectively