Skip to content

[MRG + 1] Deprecate estimator_params in RFE and RFECV #4292 #4368

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

Merged
merged 3 commits into from
Mar 20, 2015

Conversation

xuewei4d
Copy link
Contributor

@xuewei4d xuewei4d commented Mar 9, 2015

Fix #4292. Is the warning message OK?

@xuewei4d xuewei4d changed the title Deprecate estimator_params in RFE and RFECV #4292 [MRG] Deprecate estimator_params in RFE and RFECV #4292 Mar 9, 2015
estimator_params={}, verbose=0):
estimator_params=None, verbose=0):
if estimator_params is not None:
warnings.warn("The 'estimator parameters' is deprecated as of version 0.16 "
Copy link
Member

Choose a reason for hiding this comment

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

You should use the actual name estimator_params and either say Just "estimator_params is deprecated" or "The parameterestimator_params``" to make a complete english sentence.

Copy link
Member

Choose a reason for hiding this comment

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

Also, this should be done in fit, not in __init__.

@amueller amueller added this to the 0.16 milestone Mar 9, 2015
@amueller
Copy link
Member

amueller commented Mar 9, 2015

Flagging for 0.16 so we can backport and can remove earlier.

@amueller
Copy link
Member

amueller commented Mar 9, 2015

Travis failure seems unrelated, I restarted.

@xuewei4d
Copy link
Contributor Author

xuewei4d commented Mar 9, 2015

Thanks!

Do you mean the warning message should be 'The parameter estimator_params will be removed in 0.16.'?

@amueller
Copy link
Member

amueller commented Mar 9, 2015

The "flagging for 0.16" was a note to myself, @ogrisel or whoever else want's to release ;) The message should say

"The parameter 'estimator_params' is deprecated as of version 0.16 "
"and will be removed in 0.18. The parameter is no longer "
"necessary because the value is set via the estimator initialisation "
"or set_params function.

@xuewei4d
Copy link
Contributor Author

@amueller Fixed.

rfe = RFE(estimator=SVC(), n_features_to_select=4, step=0.1,
estimator_params={'kernel': 'linear'})
assert_warns_message(DeprecationWarning, deprecation_message,
rfe.fit,
Copy link
Member

Choose a reason for hiding this comment

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

You can put this on the same line as the two below.

@amueller
Copy link
Member

LGTM apart from style comments above.

@amueller amueller changed the title [MRG] Deprecate estimator_params in RFE and RFECV #4292 [MRG + 1] Deprecate estimator_params in RFE and RFECV #4292 Mar 10, 2015
@ogrisel
Copy link
Member

ogrisel commented Mar 20, 2015

LGTM as well. Merging.

ogrisel added a commit that referenced this pull request Mar 20, 2015
[MRG + 1] Deprecate estimator_params in RFE and RFECV #4292
@ogrisel ogrisel merged commit c6f6cf3 into scikit-learn:master Mar 20, 2015
@xuewei4d xuewei4d deleted the deprecate_estimator_params branch March 25, 2015 00:19
@amueller
Copy link
Member

The parameter should have been removed from the docstring, sorry, I overlooked that. @xuewei4d do you want to do that?

@xuewei4d
Copy link
Contributor Author

No problem. I will open a new PR. @amueller

@amueller
Copy link
Member

Thanks :)

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.

Deprecate estimator_params in RFE and RFECV
3 participants