-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
ElasticNetCV does not handle sample weights as expected #29248
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
Comments
Thanks for the report @snath-xoc. Please feel free to open a PR with the reproducer as a non-regression test. |
duplicate of #22914. It seems that there was several attempt PRs to fix the issue but they're all closed. |
Indeed. The code has changed a bit in |
It probably was resolved by #29442 |
Describe the bug
It seems that the _alpha_grid computations ignore sample weights and as a result the model coefficients do not match after fitting on two versions of the same data, one with weighted samples and the other with repeated samples.
Steps/Code to Reproduce
Expected Results
No error is thrown
Actual Results
Assertion on the coef_ for ElasticNet (without CV) is fine
Assertion on the ElasticNetCV alphas_ fails with the following error message
Versions
The text was updated successfully, but these errors were encountered: