-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Better error message for _check_clf_target #2147
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
|
||
# No metrics support "multiclass-multioutput" format | ||
if (y_type not in set(["binary", "multiclass", | ||
"multilabel-indicator", "multilabel-sequences"])): |
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 don't think that you need the 'set', here.
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.
Done in 947bc29
looks good to me.. +1 |
Rebase on top of master |
It seems ok to me, except the line |
I have added a comment. |
expected = EXPECTED[type2, type1] | ||
if expected is None: | ||
assert_raises(ValueError, _check_clf_targets, y1, y2) | ||
for (type1, y1), (type2, y2) in product(EXAMPLES, EXAMPLES): |
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.
alternative: product(EXAMPLES, repeat=2)
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.
Thanks ! I didn't know this one.
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.
done in 05ba27b
I would like to merge this. Is it ok for you @amueller ? |
👍 |
Great thanks ! |
Merged thanks for the reviews !!! |
Should fix #2137