decReg = DecisionTreeRegressor()
clf = decReg.fit(X, Y)
Intuitively anyone would expect either decReg or calf should have a function which will return the number of nodes in the tree grown. But, I am unable to see any such function. Is there anything else to know the tree size?
According to the documentation, there's tree_
attribute, you can traverse that tree to find any properties of interest. In particular, children_right
and children_left
properties seem to be useful.