Skip to content

Different r2_score multioutput default in r2_score and base.RegressorMixin #12772

Closed

Description

@qinhanmin2014

We've changed multioutput default in r2_score to "uniform_average" in 0.19, but in base.RegressorMixin, we still use multioutput='variance_weighted' (#5143).
Also see the strange things below:

# XXX remove in 0.19 when r2_score default for multioutput changes
from .metrics import r2_score
return r2_score(y, self.predict(X), sample_weight=sample_weight,
multioutput='uniform_average')

Activity

  1. jnothman commented on Dec 17, 2018

    @jnothman
    Member

    Should we be deprecating and changing the multioutput used in RegressorMixin? How do we allow the user to select the new approach in a deprecation period?

  2. amueller commented on Dec 17, 2018

    @amueller
    Member

    @agramfort @ogrisel can you explain the rational behind this?
    It looks to me like the behavior before the PR was exactly what we wanted an the PR broke the deprecation which requires us to do another deprecation cycle?

  3. qinhanmin2014 commented on Dec 18, 2018

    @qinhanmin2014
    MemberAuthor

    I vote +1 to deprecat and change the multioutput used in RegressorMixin. It seems misleading that r2_score and RegressorMixin have different defaults.
    But yes, the deprecation is not easy. Maybe we can just warn and change the behavior after 2 versions.

  4. qinhanmin2014 commented on Dec 18, 2018

    @qinhanmin2014
    MemberAuthor

    And can someone tell me the difference between these two multioutput choices (e..g, why do you prefer uniform_average)? Seems that the deprecation is introduced in 1b1e10c and I can't find relevant discussions.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions