-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] ENH Add trust-ncg
option to LogisticRegression
#17877
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
Conversation
Co-authored-by: Ruby Werman <rubywerman@berkeley.edu>
c0da745
to
c6d049a
Compare
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.
During development, it would be good to benchmark these solvers comparing it with the methods already supported.
Hi, @thomasjpfan ! I see this PR has been languishing for a bit. Is there something else Rithvik and Ruby need to do to make this PR ready to merge? |
This needs benchmarks to compare the new solvers with the current solvers. |
Removing the The test are failing as well. |
Hi @thomasjpfan! I wrote the following benchmark to examine memory usage and was wondering if you could take a look:
The outputs of the |
trust-ncg
and trust-krylov
options to LogisticRegressiontrust-ncg
and trust-krylov
options to LogisticRegression
I removed |
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 @rithvikrao !
Hi @thomasjpfan! Thank you for the feedback, I added in your suggestions. However, I'm confused about changing the function signature for
|
trust-ncg
and trust-krylov
options to LogisticRegressiontrust-ncg
and trust-krylov
options to LogisticRegression
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.
The user guide needs to be updated with this new solver and describe when this would be useful.
trust-ncg
and trust-krylov
options to LogisticRegressiontrust-ncg
option to LogisticRegression
all_solvers = ['liblinear', 'newton-cg', 'lbfgs', 'sag', 'saga', | ||
'trust-ncg'] |
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.
all_solvers = ['liblinear', 'newton-cg', 'lbfgs', 'sag', 'saga', | |
'trust-ncg'] | |
all_solvers = [ | |
'liblinear', 'newton-cg', 'lbfgs', 'sag', 'saga', 'trust-ncg' | |
] |
Could you update the test as well to make sure that we test for this new solver:
|
trust-ncg
option to LogisticRegressiontrust-ncg
option to LogisticRegression
@rithvikrao @rubywerman Are you sill working on this?
I did some experiments in the past, have a look at scipy/scipy#12275. |
@lorentzenchr I am not! I don't think rithvik is either |
@rubywerman Thanks for the quick reply. |
@thomasjpfan @glemaitre Shall we close or is it better to keep it open. In case someone takes over, a new PR is usually the cleanest way, anyway. |
I think the current workflow is to close the PR when there is another PR that supersedes it. I think "Stalled" + open means we are still interested in the PR and a new contributor can ask the original contributor if they can work on it. "Stalled" + closed would mean we are not interested in this feature or the "PR is too old and it would be better to start fresh". At a glance, I think this still need benchmarks, so we can advise users on "how to decide on solver" especially since we already have so many solvers. From #17877 (comment) it looks like there is a memory benefit in the sparse case. From the benchmarks by @lorentzenchr at scipy/scipy#12275, |
In particular we need benchmarks that measure and compare the CPU execution time, |
I can try picking this up and adding some benchmarks |
See conclusion in #22236. |
Co-authored-by: Ruby Werman rubywerman@berkeley.edu
Reference Issues/PRs
Fixes #17125
What does this implement/fix? Explain your changes.
Implements
trust-ncg
option inLogisticRegression
whenmulti_class = 'multinomial'
.Any other comments?