-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG+1] partly fixed issue #3450 for hamming loss #5465
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
… in sklean/metrics/tests/test_classification.py
the issue with ci/circleci seems to be related with numpy, and not with the code I provided |
yeah ignore circleci for now. |
@@ -1457,6 +1461,7 @@ def hamming_loss(y_true, y_pred, classes=None): | |||
>>> hamming_loss(np.array([[0, 1], [1, 1]]), np.zeros((2, 2))) | |||
0.75 | |||
""" | |||
#check_consistent_length(y_true, y_pred) |
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's not needed, please remove.
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.
sorry for this. it's done!
Looks good to me |
LGTM merging |
[MRG+1] partly fixed issue #3450 for hamming loss
Added sample weight support to hamming_loss in sklearn/metrics/classification.py.
Added test with https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/tests/test_common.py
Added test to compare our implementation of hamming loss with scipy's one