Skip to content

ENH enable LSQR solver with intercept term in Ridge with sparse input #22950

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

Merged
merged 5 commits into from
Mar 29, 2022

Conversation

lorentzenchr
Copy link
Member

Reference Issues/PRs

None

What does this implement/fix? Explain your changes.

This PR enables the combination Ridge(fit_intercept=True, solver="lsqr"), for sparse input X.

Any other comments?

This PR uses the same tricks as in _solve_sparse_cg, i.e. use scipy.sparse.linalg.LinearOperator to deal with X_offset.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM !

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM!

@lorentzenchr lorentzenchr merged commit 8bd7503 into scikit-learn:main Mar 29, 2022
@lorentzenchr lorentzenchr deleted the ridge_lsqr_offsets branch March 29, 2022 19:05
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Apr 6, 2022
…scikit-learn#22950)

* ENH support Ridge(fit_intercept=True, solver="lsqr") for sparse input

* DOC add whatsnew

* FIX set solver to lsqr

* DOC _get_rescaled_operator

* DOC add more details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants