[MRG+1] API Change default multioutput in RegressorMixin.score to keep consistent with metrics.r2_score#13157
[MRG+1] API Change default multioutput in RegressorMixin.score to keep consistent with metrics.r2_score#13157qinhanmin2014 merged 11 commits intoscikit-learn:masterfrom qinhanmin2014:RegressorMixin
Conversation
…tent with metrics.r2_score
|
You should note this in the docstring in any case. An alternative might be
too require multioutput to be explicit specified in r2_score
|
You mean adding a multioutput parameter in |
|
No, I mean that r2_score would no longer accept being called on multioutput without an explicit choice. |
You mean we'll raise an error for things like |
|
Well, it solves this problem since users of r2_score would become aware
that the equivalence to .score cannot be taken for granted...?
I think forcing the user to be explicit has been helpful in precision_score
etc. with respect to `average`. It was the motivation for average='binary'.
… |
So with your proposal: And this is not backward compatible, I doubt whether it's worthwhile. |
Maybe you mean that we should set multioutput explicitly in RegressorMixin.score? |
|
Maybe you mean that we should set multioutput explicitly in
RegressorMixin.score?
We already do that??? But we don't document it...
|
But this is actually a bug introduced in #5143 right? I still doubt whether it's worthwhile to let all the regression metrics which supports multioutput to raise an error when parameter multioutput is not set explicitly (y_type is multioutput). Is this your final decision? |
|
No I suppose it doesn't really solve the problem... Documentation does.
|
@jnothman Could you please summarize your proposal here? I'm starting to get confused. Thanks. |
|
I'm surprised to find that we implement the score method in MultiOutputRegressor and are using |
|
Can we stay by documenting the current behaviour? |
|
@jnothman current behavior: |
jnothman
left a comment
There was a problem hiding this comment.
Okay. I'm persuaded. I think this is an okay solution, albeit raising lots of warnings for the next while.
|
ready for review @jnothman |
|
ping related people here: @amueller @agramfort @ogrisel |
|
Thanks! Maybe we should tell the user how to avoid this message? It's a bit ugly unfortunately. They can specify it directly when using cv or grid-search. |
…tent with metrics.r2_score (scikit-learn#13157)
…p consistent with metrics.r2_score (scikit-learn#13157)" This reverts commit 587fcf5.
…p consistent with metrics.r2_score (scikit-learn#13157)" This reverts commit 587fcf5.
…tent with metrics.r2_score (scikit-learn#13157)
Closes #12772
Wondering if someone has a better way :)
In the original issue, I tried to ask why we prefer uniform_average, but received no reply. I guess we choose uniform_average to keep consistent with other regression metrics.