Repository navigation
ENH Newton-CD part 7: add NewtonCDSolver - #34561
Conversation
|
|
Co-authored-by: Virgil Chan <[email protected]>
|
CI looks better now. I will review it later. |
OmarManzoor
left a comment
There was a problem hiding this comment.
LGTM. Thank you @lorentzenchr
There is an error in relation to the change log
|
The changelog renders fine, so I set the "no changelog needed" label. |
OmarManzoor
left a comment
There was a problem hiding this comment.
So I used Gemini Pro to analyze just the NewtonCDSolver class and I am sharing some points which I think are valid.
virchan
left a comment
There was a problem hiding this comment.
The PR looks good to me.
One question: should we do something about the codecov warning?
I'd be more comfortable merging once CI is all green, but if this is going to be addressed in the follow-up PR, I'm also fine with merging this as is.
I would prefer not to. It will work out, part 8 can follow. |
Ok. Let's merge this! |
Co-authored-by: Virgil Chan <[email protected]>
Reference Issues/PRs
Part 7 of #33160, follow-up of #34377 and #34523.
What does this implement/fix? Explain your changes.
This PR implements the new GLM-solver class
NewtonCDSolverwhich is much likeNewtonCDGramSolverof #34377. It uses our coordinate-descent functions without the "gram" matrix as inner solver.The solver="newton-cd" is then publicly exposed in
LogisticRegression,LogisticRegressionCV,PoissonRegressor,GammaRegressor,TweedieRegressor.The multinomial/multiclass (n_classes >= 3) case is not yet implemented because existing (in literature and packages) algorithms do not converge for simple test cases. See the extensive code comment. There are follow-ups to close this gap.
AI usage disclosure
I used AI assistance for:
Any other comments?
This solver is good for
n_features > n_samples.