-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] handle sparse x and intercept in _RidgeGCV #13350
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
[MRG] handle sparse x and intercept in _RidgeGCV #13350
Conversation
some figures to compare the current and proposed behaviors, which can be https://gist.github.com/jeromedockes/7fca2698f6ab7413903c782becc22c59 |
note: the proposed solution passes |
I haven't yet merged master because |
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.
Another pass over the implementation.
096b444
to
6e5ea75
Compare
This formally has 3 approvals. I've not looked at it. Is it ready for merge? Are we releasing in 0.21, or 0.22? |
I am still +1 for merge. It seems that all @thomasjpfan comments have been addressed but it would be great to have his confirmation before merging. I think this is an important bug fix so +1 for 0.21 but I am fine to merge to master only for 0.22 if others disagree. |
now _{decomposition method used}_decompose_{decomposed matrix} and _solve_{provided decomposition}_{matrix whose decomposition is provided} e.g. _eigen_decompose_covariance, _solve_eigen_covariance
We had an IRL discussion with @jeromedockes and we decided to stick to float64 for This means that some of the changes from #13302 have been reverted. Only the |
@thomasjpfan please confirm and merge |
Looking into it. Going over the implementation one last time before merging. |
Thank you! @jeromedockes |
Great job @jeromedockes 👏 |
many thanks to @agramfort, @glemaitre, @ogrisel and @thomasjpfan for the time |
closes #2354, closes #13325, closes #5364, closes #13321, closes #4781.
Currently, if the design matrix is sparse, no intercept is fitted by
_RidgeGCV
, even iffit_intercept
is true.This is an attempt to handle this case correctly when
gcv_mode
is "eigen",which uses an eigendecompositon of the Gram matrix.
(
gcv_mode="svd"
cannot handle sparse matrices because the left singularvectors of X are dense and this could use too much memory).
This is work in progress and for now, to make comparison easier, suggested
changes are implemented in a subclass of
_RidgeGCV
,_WIPNewRidgeGCV
.