-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Add info when scoring = None
in cross_validate
#30303
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
Conversation
Oh wonderful! ❤️ I can't believe this wasn't there before. And upon lookup, there are many other places, where this information is lacking: RFECV, SequentialFeatureSelector, LogisticRegressionCV, RidgeClassifierCV, LearningCurveDisplay, ValidationCurveDisplay, GridSearchCV, learning_curve, validation_curve. |
@@ -169,7 +169,7 @@ def cross_validate( | |||
|
|||
scoring : str, callable, list, tuple, or dict, default=None | |||
Strategy to evaluate the performance of the cross-validated model on | |||
the test set. | |||
the test set. If None, the `estimator` object's `score` method is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test set. If None, the `estimator` object's `score` method is used. | |
the test set. If `None`, the `estimator`'s `.score()` method will be used. |
WDYT?
@@ -169,7 +169,7 @@ def cross_validate( | |||
|
|||
scoring : str, callable, list, tuple, or dict, default=None | |||
Strategy to evaluate the performance of the cross-validated model on | |||
the test set. | |||
the test set. If None, the `estimator` object's `score` method is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I would word it something more inline with the definition of the Estimator score method and maybe even link to that page of the user guide. WDYT of something similar to:
If None, the default evaluation criterion of the
estimator
is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's a good idea, it gives more info/context as the user does not necessarily know what 'score' method implies. Changed (and link added).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think @ArturoAmorQ's recommendation is better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lucyleeow, merging!
Thank you! I'm going to take a look at the others @StefanieSenger mentioned and make sure the documentation of this particular item is consistent! |
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Adds info for when when
scoring = None
incross_validate
to docstring.Any other comments?