Skip to content

More intuitive scoring argument for loss and error #5023

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

Closed
arjoly opened this issue Jul 23, 2015 · 31 comments
Closed

More intuitive scoring argument for loss and error #5023

arjoly opened this issue Jul 23, 2015 · 31 comments
Labels

Comments

@arjoly
Copy link
Member

arjoly commented Jul 23, 2015

Using the grid search meta-estimator with the "mean_square_error", the "mean_absolute_error", the "median_absolute_error" or the "log_loss" as scoring parameters leads to the negation of those metrics. This is confusing especially for new users.

I suggest that we prefix those strings by "neg-" or "negative_". This would make clear from the start that the score is obtained from the negation of the loss / error.

@arjoly arjoly added the API label Jul 23, 2015
@kastnerkyle
Copy link
Member

1000x agreed

On Thu, Jul 23, 2015 at 12:17 PM, Arnaud Joly notifications@github.com
wrote:

Using grid search with the "mean_square_error", the "mean_absolute_error",
the "median_absolute_error" or the "log_loss"` as scoring parameter lead
to the negation of those metrics.
This is confusing especially for new users.

I suggest that we prefix those strings by "neg-" or "negative_". This
would make clear from the start that the score is obtained from the
negation of the loss / error.


Reply to this email directly or view it on GitHub
#5023.

@mblondel
Copy link
Member

See also #2439.

There is also the solution of flipping the sign back but more people seem to favor the neg- prefix solution.

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Jul 27, 2015 via email

@amueller
Copy link
Member

I'd prefer to flip the sign back (which needs an additional line in GridSearchCV and friends).
As we can't seem to be able to get a consensus for that, I guess we have to go with some prefix like that.

@jnothman
Copy link
Member

jnothman commented Aug 3, 2015

Prefix could just be - of course...

@arjoly
Copy link
Member Author

arjoly commented Sep 9, 2015

Recently, I met one more people that was bitten by this. This person was very frustrated after loosing hours to understand what was happening.

@mblondel
Copy link
Member

mblondel commented Sep 9, 2015

We could quickly implement both strategies (prefix and flipping sign back) in a branch and try them on an actual use case. This will probably help make our mind.

@amueller
Copy link
Member

amueller commented Sep 9, 2015

well we had flipping the sign back in master. The main criticism was that it requires one line of code in GridSearchCV iirc.
I'm not sure implementing the prefix will help us decide, because it is more about user perception. The implementation is pretty straight-forward, right?
The question is just if users will be confused that we don't have mse, but instead negative_mse / -mse

@mblondel
Copy link
Member

mblondel commented Sep 9, 2015

We should A/B test our API :)

well we had flipping the sign back in master

I didn't know, when?

@amueller
Copy link
Member

amueller commented Sep 9, 2015

When we introduced the scoring. I thought you removed it in the refactoring.

@mblondel
Copy link
Member

mblondel commented Sep 9, 2015

Strange, I'm my self +1 for flipping the sign back.

@amueller
Copy link
Member

amueller commented Sep 9, 2015

@larsmans
Copy link
Member

larsmans commented Sep 9, 2015

Yeah, that was me... +1 on the neg_ prefix, I think I suggested that somewhere, too.

@amueller
Copy link
Member

@jnothman
Copy link
Member

https://issues.apache.org/jira/browse/SPARK-10097 ^^

They managed to close the issue in under 24 hours. Lol.

@amueller
Copy link
Member

@larsmans why don't you like the other approach?

@amueller
Copy link
Member

@jnothman They seem to be slightly more efficient then us lol. But I think they also have a couple of people full time on it.

@larsmans
Copy link
Member

Because it requires adding attributes on functions, which at the time I deemed to hacky and complicated for custom metrics. However, I'm willing to drop that concern. We need to solve the issue one way or another.

@amueller
Copy link
Member

Maybe we can discuss this at the sprint. This is really bad: https://github.com/scikit-learn/scikit-learn/pull/5498/files#diff-ff4438be9ee77932848f5abfcec060efR690

@ogrisel
Copy link
Member

ogrisel commented Oct 21, 2015

Initially I was in favor of having an explicit flag to state whether higher is better. I think I still prefer this solution over the neg- prefix solution.

@amueller
Copy link
Member

We just had a discussion and agreed on the neg- fix

@lvrzhn
Copy link

lvrzhn commented Nov 16, 2015

Working on this now.

@OmidSaremi
Copy link

Working on it with @lvrzhn

@amueller
Copy link
Member

@lvrzhn do you have a pull request?

@davidthaler
Copy link
Contributor

Is anybody on this? If not, I'd like to take a shot at it. Also, is this supposed to be fixed at 0.17x or 0.18? This part of the code changed a lot between those milestones.

@lvrzhn
Copy link

lvrzhn commented Dec 11, 2015

David, I'm on it. Will do pull request today.

On Fri, Dec 11, 2015, 01:45 David Thaler notifications@github.com wrote:

Is anybody on this? If not, I'd like to take a shot at it. Also, is this
supposed to be fixed at 0.17x or 0.18? This part of the code changed a lot
between those milestones.


Reply to this email directly or view it on GitHub
#5023 (comment)
.

@raghavrv
Copy link
Member

@davidthaler @lvrzhn Could I take up this issue?

@jnothman
Copy link
Member

it looks like the PR at #6028 had been accidentally closed. I've reopened it on the basis that there was no indication it should be closed. @lvrzhn are you still intending to fix it up?

@raghavrv
Copy link
Member

Ah! Sorry I missed that PR!

@jykong
Copy link

jykong commented Jun 10, 2016

+1 from a confused new user

@amueller
Copy link
Member

fixed in #7261.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests