Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH improve linesearch of NewtonSolver - #34157

Merged
virchan merged 9 commits into
scikit-learn:mainfrom
lorentzenchr:smarter_linesearch
Jun 20, 2026
Merged

ENH improve linesearch of NewtonSolver#34157
virchan merged 9 commits into
scikit-learn:mainfrom
lorentzenchr:smarter_linesearch

Conversation

@lorentzenchr

Copy link
Copy Markdown
Member

Reference Issues/PRs

None

What does this implement/fix? Explain your changes.

This PR improves the line search of the "newton-cholesky" solver.
Instead of decreasing the step size by a factor of 0.5, it now uses quadratic of cubic polynomial interpolation to find the next step size.

AI usage disclosure

None

Any other comments?

@lorentzenchr

Copy link
Copy Markdown
Member Author

@ogrisel You mentioned you found some corner cases where the current code has regressions. Could you point me to the places where it goes wrong or provide the examples?

@lorentzenchr

Copy link
Copy Markdown
Member Author

@virchan @OmarManzoor This might also interest you.

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few minor comments otherwise looks good. Thank you @lorentzenchr

Comment thread doc/whats_new/upcoming_changes/sklearn.linear_model/34157.efficiency.rst Outdated
Comment thread sklearn/linear_model/_glm/_newton_solver.py Outdated
Comment thread sklearn/linear_model/_glm/_newton_solver.py Outdated
Comment thread sklearn/linear_model/_glm/_newton_solver.py Outdated
@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Jun 16, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Jun 16, 2026

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for this nice PR @lorentzenchr

@OmarManzoor OmarManzoor added the Waiting for Second Reviewer First reviewer is done, need a second one! label Jun 17, 2026
Comment thread sklearn/linear_model/_glm/_newton_solver.py Outdated
@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Jun 19, 2026
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Jun 19, 2026

@virchan virchan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks, @lorentzenchr!

@virchan
virchan merged commit b171019 into scikit-learn:main Jun 20, 2026
38 checks passed
@lorentzenchr
lorentzenchr deleted the smarter_linesearch branch June 20, 2026 05:50
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:linear_model Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants