Skip to content

More intuitive scoring argument for loss and error  #5023

Closed

Description

@arjoly

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.

Activity

  1. kastnerkyle commented on Jul 23, 2015

    @kastnerkyle
    Member

    1000x agreed

    On Thu, Jul 23, 2015 at 12:17 PM, Arnaud Joly [email protected]
    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.

  2. mblondel commented on Jul 27, 2015

    @mblondel
    Member

    See also #2439.

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

  3. GaelVaroquaux commented on Jul 27, 2015

    @GaelVaroquaux
    Member
  4. amueller commented on Jul 30, 2015

    @amueller
    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.

  5. jnothman commented on Aug 3, 2015

    @jnothman
    Member

    Prefix could just be - of course...

  6. arjoly commented on Sep 9, 2015

    @arjoly
    MemberAuthor

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

  7. mblondel commented on Sep 9, 2015

    @mblondel
    Member

    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.

  8. amueller commented on Sep 9, 2015

    @amueller
    Member

    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

  9. mblondel commented on Sep 9, 2015

    @mblondel
    Member

    We should A/B test our API :)

    well we had flipping the sign back in master

    I didn't know, when?

  10. amueller commented on Sep 9, 2015

    @amueller
    Member

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

  11. mblondel commented on Sep 9, 2015

    @mblondel
    Member

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

  12. amueller commented on Sep 9, 2015

    @amueller
    Member
  13. larsmans commented on Sep 9, 2015

    @larsmans
    Member

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

  14. 3 remaining items

  15. larsmans commented on Sep 10, 2015

    @larsmans
    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.

  16. ogrisel commented on Oct 21, 2015

    @ogrisel
    Member

    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.

  17. amueller commented on Oct 23, 2015

    @amueller
    Member

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

  18. lvrzhn commented on Nov 16, 2015

    @lvrzhn

    Working on this now.

  19. OmidSaremi commented on Nov 16, 2015

    @OmidSaremi

    Working on it with @lvrzhn

  20. amueller commented on Dec 11, 2015

    @amueller
    Member

    @lvrzhn do you have a pull request?

  21. davidthaler commented on Dec 11, 2015

    @davidthaler
    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.

  22. lvrzhn commented on Dec 11, 2015

    @lvrzhn

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

    On Fri, Dec 11, 2015, 01:45 David Thaler [email protected] 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)
    .

  23. raghavrv commented on Apr 30, 2016

    @raghavrv
    Member

    @davidthaler @lvrzhn Could I take up this issue?

  24. jnothman commented on Apr 30, 2016

    @jnothman
    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?

  25. raghavrv commented on Apr 30, 2016

    @raghavrv
    Member

    Ah! Sorry I missed that PR!

  26. jykong commented on Jun 10, 2016

    @jykong

    +1 from a confused new user

  27. amueller commented on Sep 12, 2016

    @amueller
    Member

    fixed in #7261.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions