-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
[MRG] FIX numpy 1.3 issues with the new multilabel metrics #1741
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
sklearn/metrics/metrics.py
Outdated
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.
typo: required
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.
BTW, this typo is replicated several times.
|
I am not sure how |
|
I fix the typo! |
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.
maybe add a comment both are in list of labels format
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.
Why both?
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.
y_pred and y_true.
|
to me it looks a bit as if the updated part should be refactored into a separate function. otherwise it looks good. |
|
If you want, I can backport There are other part that could be simplify once #1643 will be merged. |
|
I rather thought about refactoring a larger part. Can we not just implement one of the functions in terms of the other? |
|
If all the tests pass, +1 for merge. |
|
ok,lets merge and refactor later. Lars Buitinck notifications@github.com schrieb:
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. |
[MRG] FIX numpy 1.3 issues with the new multilabel metrics
|
I pushed the green button. Hopefully jenkins will be happy. |
@amueller I though about it and decided to avoid memory copy each time the data aren't properly formatted. |
|
Sorry, I don't think I understand the argument. Can you elaborate? |
|
For the moment, there is one implementation of the measure per format type (multiclass, indicator-matrix, list-of-labels). If you write one implementation for all format, you will need to perform data transformation each time you aren't in the proper format. |
|
What I meant was to do #1748, not refactor the format types. |
With the support of multilabel input for the
zero_one_loss,accuracy_scoreandhamming_loss, there were 2 bugs with numpy 1.3:np.setxor1ddoes not make unique by default (and so, there were some failures with redundant labels)This patch intend to solve both of these issues.
For more information, see #1606 and jenkins console log.