-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MNT Speed up plot_sparse_logistic_regression_20newsgroups.py #21773
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 Speed up plot_sparse_logistic_regression_20newsgroups.py #21773
Conversation
On the CI, the change does not show the improvement but actually a slowdown (30 seconds instead of 20 seconds). I assume that here there is some convergence issue that reducing the number of samples does not mean necessarily that we will speed up the convergence. Quite fun as well that scaling data make things worse. |
It might only be bad luck regarding the node that we got on the CI thought. Locally, I can observe the speed up |
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.
It might be enough then.
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.
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
Hello! First time contributing. Please tell me if I have done something wrong! Thank you!
Reference Issues/PRs
Fixes #21598
What does this implement/fix? Explain your changes.
Specifically, speed up
examples/linear_model/plot_sparse_logistic_regression_20newsgroups.py
from 18.05 seconds to 4.59 seconds.I've updated the number of epochs and training labels to speed it up. Also confirmed the expected result where multinomial logistic regression is more accurate and faster than 1 vs all L1 logistic regression.
Any other comments?