-
-
Notifications
You must be signed in to change notification settings - Fork 26.6k
FIX screening in enet_coordinate_descent_multi_task #32811
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
FIX screening in enet_coordinate_descent_multi_task #32811
Conversation
0132f40 to
5b840eb
Compare
5b840eb to
8662cb3
Compare
|
@lesteve @jeremiedbb For a potential 1.8.1. release. |
|
Actually we're still between RC and final so we can include bug fixes for the final release. I put it in the 1.8 milestone |
virchan
left a comment
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.
LGTM! Thanks, @lorentzenchr!
Not really. The algo was correct before this fix (-> all tests did pass). It is now more efficient (and the tests still pass). |
|
FYI, I am reviewing this PR at the moment. |
ogrisel
left a comment
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.
I tried to evaluate the impact of this change, but despite some effort I could never write code that would reach the branch in line 1447, hence this change has probably no effect. I also checked that our existing tests do not cover that branch (note that we do not collect Cython code coverage data, so this lack of coverage is not easy to spot).
The matching code in enet_coordinate_descent is the branch at line 379. This branch is covered by our tests (namely test_sparse_dense_equality) but only with non-unit sample_weight values. As the MultiTask{Lasso,ElasticNet} classes do not accept sample weights, I could not find an easy way to adapt this test case of enet_coordinate_descent to increase that branch of enet_coordinate_descent_multi_task.
So to conclude, this change has no user impact but makes the code a bit more consistent. We probably have dead code in enet_coordinate_descent_multi_task but we could address this concern later.
|
Thanks a lot @ogrisel for the review and merge! |
Co-authored-by: Loïc Estève <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Reference Issues/PRs
Aftermath of #32014.
What does this implement/fix? Explain your changes.
This fixes a tiny code bug. I think it does (almost never) influence fitting an estimator.
Any other comments?