-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+1] TST: added test for estimators supporting list of weights #8261
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
Conversation
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.
If it works, why is it WIP?
Ideally we'd like to check the model is identical invariant of list vs array. However, we don't have an easy way to check models are identical. Maybe leave a comment.
Otherwise LGTM
Sorry. I somehow ignored the fact that tests are failing. |
Yup. |
@jnothman Yes, working on it. |
A list is array-like. We want to support it. |
Oh. Sorry, I had misunderstood the meaning. I'll fix it. |
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.
check_array
and check_consistent_length
might be appropriate.
This looks good & tests are passing. +1 for merge from my side. Thanks! |
LGTM! Thanks! |
Reference Issue
Fixes #8064
What does this implement/fix? Explain your changes.
This adds a common test for all estimators showing that they support a list of weights as the value for the
sample_weight
argument tofit
.Any other comments?
Since the estimators didn't throw any error, I assume that they support it. So, I have just implemented something to get the PR going. Please provide feedback as to whether my approach is the correct one.