-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MNT accelerate plot_gradient_boosting_early_stopping.py example #21609
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
MNT accelerate plot_gradient_boosting_early_stopping.py example #21609
Conversation
Here too, please paste both before and after plots, to make the reviews faster and more fluent. |
Could you try replacing the digits dataset with a synthetic dataset ( |
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 @sply88.
@glemaitre WDYT? It makes a 48s example a 2s example.
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.
Thank you for the PR @sply88 !
Makes example results deterministic. Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…ng_early_stopping.py
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
…it-learn#21609) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…it-learn#21609) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…it-learn#21609) Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Speeds up ../examples/ensemble/plot_gradient_boosting_early_stopping.py (Issue #21598) by
make_hastie_10_2
n_estimators
to 200On my laptop example now takes sub 11 seconds (previously plus 50).
Main points (almost same accuracy and significant reduction of training time) are still very obvious in the plots:

