-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
ENH improve HGBT predict classes #27844
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
ENH improve HGBT predict classes #27844
Conversation
thomasjpfan
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.
Codewise this looks more efficient. Did you find a measurable performance benefit?
In any case, LGTM.
betatim
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.
Looks good to me. I assume it is faster because it does less work (we save the detour via self._loss).
One thing that would have helped me understand why this is an equivalent thing to do is more documentation on what _raw_predict returns. Mostly because my editor couldn't help me find the implementation of self._loss.predict_proba. There is a _loss.c in the directory, but no _loss.pyx, so I guess the actual code for this comes from sklearn/_loss/loss.py?? (you see confusion reigns supreme :D)
|
@betatim Think GLMs: You compute a raw prediction in "link space". This is called linear predictor for GLM, just |
Co-authored-by: Guillaume Lemaitre <[email protected]>
…scikit-learn into hgbt_predict_class
|
@jeremiedbb it seems this has not been merged for the 1.4. Would you be inclined in including it in the 1.4 or should we postpone for 1.5? |
|
The whatsnew entry needs to be moved to 1.5, right? |
|
Indeed. We need to. I'll make the fix. |
Co-authored-by: Guillaume Lemaitre <[email protected]>
Reference Issues/PRs
This PR avoids the call to
predict_probawhen executingpredictin HGBT.What does this implement/fix? Explain your changes.
Any other comments?