8000 change kfold to k_fold for consistency;fix example by asishm · Pull Request #8330 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 2 commits into from
Feb 11, 2017
Merged

change kfold to k_fold for consistency;fix example #8330

merged 2 commits into from
Feb 11, 2017

Conversation

asishm
Copy link
Contributor
@asishm asishm commented Feb 9, 2017

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?

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)
Copy link
Member
@lesteve lesteve Feb 9, 2017

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks good to me

@lesteve
Copy link
Member
lesteve commented Feb 11, 2017

Merging, thanks a lot!

@lesteve lesteve merged commit c6b2002 into scikit-learn:master Feb 11, 2017
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
lemonlaug pushed a commit to lemonlaug/scikit-learn that referenced this pull request Jan 6, 2021
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.

2 participants
0