-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
change kfold to k_fold for consistency;fix example #8330
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
kfold would result in a NameError in that specific codeblock. Rename kfold to k_fold to keep it consistent with other instances of KFold in the other snippets.
@@ -70,7 +70,7 @@ This example shows an example usage of the ``split`` method. | |||
|
|||
The cross-validation can then be performed easily:: | |||
|
|||
>>> kfold = KFold(n_splits=3) | |||
>>> k_fold = KFold(n_splits=3) |
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. Actually I am wondering whether this line should not be removed since k_fold
is already defined a few lines above here.
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.
That's also fair game. Since the snippets below the one referenced for cross_val_score
don't create another KFold
instance.
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.
I removed the line and I'll wait for the CI. I'll merge this one they come back green.
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.
Looks good to me
Merging, thanks a lot! |
Reference Issue
What does this implement/fix? Explain your changes.
kfold would result in a NameError in that specific codeblock. (in the documentation)
Rename kfold to k_fold to keep it consistent with other instances of KFold in the other snippets.
Any other comments?