-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
RFECV cross-validation generator (cv
) parameter
#29554
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
Labels
Comments
Yes indeed. This is a typo. @bioruffo Do you wish to do a pull request? |
Yes I'll be happy to! |
Cheers. |
Is this closeable? |
Yes the typo was corrected in the above-mentioned merge, thank you! |
Alright good. You can close yourself you don't have to wait for a mod. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue linked to the documentation
Hello,
if I'm not mistaken, I think that the documentation of RFECV about the
cv
parameter might be incorrect regarding the choice of StratifiedKFold or KFold when the estimator is a classifier. The docs read:Which matches the _rfe.py file.
I believe that the correct phrasing of the second sentence is that it's when the estimator is not a classifier, then KFold will be used. When a classifier is used (and y is binary or multiclass), it's possible to perform StratifiedKFold.
In fact, code-wise, the
cv
parameter is processed by check_cv, which states,(here
classifier
is a boolean that is True when the estimator is a classifier).According to the code of
check_cv()
, ifcv
is supplied as an integer (and so a cv method must be chosen), and the estimator is a classifier, and y is binary or multiclass, then the cv generator will indeed be aStratifiedKFold
.Thank you!
Suggest a potential alternative/fix
I suggest changing the phrasing "If the estimator is a classifier" to "If the estimator is not a classifier".
The text was updated successfully, but these errors were encountered: