New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DecisionTreeClassifier max_leaf_nodes tree.tree_.value is set to 0 for non leaf nodes. Normal behaviour? #4644
Comments
I think that is because different splitting stragegies are used depending on whether you set |
The reason was only to speed things up. @arjoly I wonder however if this was indeed needed at all. It seems that these counts should be there already (since we need them to compute the impurity decrease), hence storing them shouldnt hurt much. What do you think? |
If benchmarks show that the tree growing procedure is not significantly slower, I am +1.
At the moment, we don't need those. Could you clarify? |
They are a useful output if you want to present the results to a non-technical audience and don’t want to explain entropy :-) |
well you could reconstruct them from the output you have, there is a 1:1 mapping between leaves and path ;) |
#3735 ... just sayin... ;-) |
PR created #4655 |
This is now fixed :) |
Hi
If I leave out max_leaf_nodes or set it to None when accessing tree.tree_.value all non leaf nodes values are set to zero and leaf node is correct. If I set the value to something like 10 the values are present?
Iterating through a branch
Iterating through a branch
Rob
The text was updated successfully, but these errors were encountered: