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

FIX add best_score_ to Ridge*CV estimators #15655

Merged
merged 9 commits into from Dec 10, 2019

Conversation

glemaitre
Copy link
Contributor

closes #4667
closes #4790

Add best_score_ attribute in Ridge*CV.
Build on #15652

@glemaitre glemaitre changed the title Is/best score ridge FIX add best_score_ to Ridge*CV estimators Nov 18, 2019
@glemaitre
Copy link
Contributor Author

@qinhanmin2014
Copy link
Member

Remove irrelevant things? I guess you're going to split that PR into multiple parts.

@glemaitre
Copy link
Contributor Author

@qinhanmin2014 OK, this should be easy to review now since there is only relevant information to be merged.

@glemaitre
Copy link
Contributor Author

@rth, @adrinjalali could you have a look at it as well.

@glemaitre glemaitre changed the title FIX add best_score_ to Ridge*CV estimators [MRG] FIX add best_score_ to Ridge*CV estimators Dec 10, 2019
@@ -1693,6 +1695,9 @@ class RidgeCV(MultiOutputMixin, RegressorMixin, _BaseRidgeCV):
alpha_ : float
Estimated regularization parameter.

best_score_ : float
Score of base estimator with best alpha on the hold out data.
Copy link
Member

Choose a reason for hiding this comment

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

the version from GridSearchCV seems better: "Mean cross-validated score of the best_estimator"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the docstring. However, I don't refer to best_estimator because we don't have such attributes (while it is available in GridSearchCV).

Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -73,6 +73,10 @@ Changelog
`store_cv_values` is `True`.
:pr:`15652` by :user:`Jérôme Dockès <jeromedockes>`.

- |Fix| add `best_score_` attribute to :class:`linear_model.RidgeCV` and
:class:`linear_model.RidgeClassifierCV`.
:pr:`15653` by :user:`Jérôme Dockès <jeromedockes>`.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add yourself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is fine :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was originally @jeromedockes, I am just splitting the PR such that it is easy to review

@rth rth changed the title [MRG] FIX add best_score_ to Ridge*CV estimators FIX add best_score_ to Ridge*CV estimators Dec 10, 2019
@rth rth merged commit a07974b into scikit-learn:master Dec 10, 2019
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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.

RidgeCV should provide best_score_
4 participants