Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 4 commits into from
Oct 21, 2015

Conversation

achab
Copy link
Contributor

@achab achab commented Oct 19, 2015

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

@achab
Copy link
Contributor Author

achab commented Oct 20, 2015

the issue with ci/circleci seems to be related with numpy, and not with the code I provided

@amueller
Copy link
Member

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)
Copy link
Member

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.

Copy link
Contributor Author

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!

@fabianp fabianp changed the title partly fixed issue #3450 for hamming loss [MRG+1] partly fixed issue #3450 for hamming loss Oct 21, 2015
@fabianp
Copy link
Member

fabianp commented Oct 21, 2015

Looks good to me

@agramfort
Copy link
Member

LGTM

merging

agramfort added a commit that referenced this pull request Oct 21, 2015
[MRG+1] partly fixed issue #3450 for hamming loss
@agramfort agramfort merged commit b6a5ed2 into scikit-learn:master Oct 21, 2015
@achab achab deleted the dev-massil branch January 4, 2016 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants