MNT Speed up plot_sparse_logistic_regression_20newsgroups.py#21773
Merged
ogrisel merged 1 commit intoscikit-learn:mainfrom Nov 26, 2021
Merged
Conversation
Contributor
Author
41 tasks
Member
|
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. |
Member
|
It might only be bad luck regarding the node that we got on the CI thought. Locally, I can observe the speed up |
Contributor
Author
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Nov 29, 2021
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
samronsin
pushed a commit
to samronsin/scikit-learn
that referenced
this pull request
Nov 30, 2021
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
glemaitre
pushed a commit
to glemaitre/scikit-learn
that referenced
this pull request
Dec 24, 2021
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
glemaitre
pushed a commit
that referenced
this pull request
Dec 25, 2021
Co-authored-by: Alex Leu <alexcleu@ucla.edu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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.pyfrom 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?