-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
FIX RidgeCV works with multioutput and sample-weight non-default score #29877
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 RidgeCV works with multioutput and sample-weight non-default score #29877
Conversation
OK so the reason is that we should not I added a non-regression test. I don't think that we need to have an entry in the changelog since before we were not using |
ping @OmarManzoor @StefanieSenger @adrinjalali that already have a good understanding if this part of the code. FYI the original error would have been something like: E ValueError: Found input variables with inconsistent numbers of samples: [200, 200, 100] because the raveling would transform the predictions and true label from a shape of |
I can add an additional test by defining a custom scorer that would not do a simple uniform average between the target. In this case, it should fail in |
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 @glemaitre
This PR is fixing the following case:
RidgeCV
withscoring != None
sample_weight
y
should be multioutputAs stated in #29842 (comment), there is a bug. Previous to metadata routing, we did not use
sample_weight
for the scoring and we never encounter this bug.