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
FIX limit warnings for recall_score, precision_score, f1_score, #2592
Conversation
Looks good to me. |
Why not using |
Only because I was copying the test already there -- which was written before we had imported |
…into prf_derivative_warnings
Actually, @arjoly, I forgot: I can and have now used If you're fine with this PR, @arjoly, perhaps it's trivial enough to merge with a single +1... |
It would be nice to have a second thought on the new |
Yes, I wondered that. What does it mean to be private? I can prefix it with On Tue, Nov 19, 2013 at 6:41 PM, Arnaud Joly notifications@github.comwrote:
|
So what do you think, @arjoly, a parameter named |
I think that I would go for your solution, but consider that |
@ogrisel, @GaelVaroquaux, @amueller Any thoughts on the |
Still think that this is the way to go with a mention that this is for internal use. |
elif 'f-score' in warn_for: | ||
msg_start = 'F-score is' | ||
else: | ||
return result |
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 it doesn't raise a ValueError
here if metric is not in warn_for
?
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.
That's what we're handling: 'precision' won't be in warn_for
when we're calling recall_score
. The output of this division will be ignored anyway (and indeed, we could avoid that further up stream).
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 !
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 it doesn't raise a ValueError here if metric is not in warn_for?
This the way to disable warnings as you requested earlier isn't 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.
I was thinking to what happened when somebody put some garbage string in warn_for
and thought that it might generate an error. But the current behaviour is also fine.
About the |
Ok then +1 for merge !! |
+1 as well. I will push the green button. |
FIX limit warnings for recall_score, precision_score, f1_score,
Thanks @jnothman |
Thanks! It is good to know @mblondel can now sleep easy at night. |
I reported a problem in the code base. Apparently, you were aware of it before merge but didn't bother to fix it so don't blame me for your poor standards. Also if you could stick to the facts, that would be nice. Thanks! |
Well, now I'm sorry for some offence you appear to have taken at a joke! I wasn't accusing you of anything, nor passing blame... |
fixes #2586