Skip to content
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

MNT Update deprecation message in RegressorMixin.score to tell users how to avoid the warning #13477

Merged
merged 2 commits into from Mar 29, 2019
Merged

MNT Update deprecation message in RegressorMixin.score to tell users how to avoid the warning #13477

merged 2 commits into from Mar 29, 2019

Conversation

qinhanmin2014
Copy link
Member

In response to @amueller 's comment #13157 (comment)

@qinhanmin2014
Copy link
Member Author

Actually another simple way to avoid the warning is to use scoring="r2", but maybe it's unrealistic to include everything in the deprecation message?

sklearn/base.py Outdated
either call `metrics.r2_score` directly or make a custom scorer with
`metrics.make_scorer`.
`multioutput.MultiOutputRegressor`). To specify the default value
manually and avoid the warning,, please either call `metrics.r2_score`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: ,,

@NicolasHug
Copy link
Member

As setting scoring='r2' is easier than creating a custom scorer, maybe we should recommend this alternative instead?

@qinhanmin2014
Copy link
Member Author

As setting scoring='r2' is easier than creating a custom scorer, maybe we should recommend this alternative instead?

OK, I'll turn to a more detailed version for this annoying issue.

@qinhanmin2014 qinhanmin2014 added this to the 0.21 milestone Mar 24, 2019
Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of text, but okay.

@qinhanmin2014
Copy link
Member Author

Trivial, merging.

1 similar comment
@qinhanmin2014
Copy link
Member Author

Trivial, merging.

@qinhanmin2014 qinhanmin2014 merged commit 8f35843 into scikit-learn:master Mar 29, 2019
@qinhanmin2014 qinhanmin2014 deleted the r2_score_deprecation_message branch March 29, 2019 07:24
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants