-
-
Notifications
You must be signed in to change notification settings - Fork 26.5k
FIX Uses log2 in tree building #30557
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
FIX Uses log2 in tree building #30557
Conversation
OmarManzoor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @thomasjpfan
|
The name of the fragment should be |
|
Do you think that it is worth a minimal non-regression test to acknowledge that we use the |
|
We might also want to delete the This change would better be done in another MAINT PR that would not be part of the 1.6.1 released fix. |
I approved the PR but forgot about this point. I am not sure how to do that, but it would be great to find a way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a non-regression test that uses an example that fails on main and passes with this PR.
| best.pos += best.n_missing | ||
|
|
||
|
|
||
| def _py_sort(float32_t[::1] feature_values, intp_t[::1] samples, intp_t n): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this function to test sort directly.
Reference Issues/PRs
Fixes #30554
What does this implement/fix? Explain your changes.
This PR replaces
logwithlog2and explicitly uses that insklearn/tree/_partitioner.pyx, so it's more clear that we are using base 2.