Skip to content

documentation for random_state in model_selection/split#15575

Merged
glemaitre merged 13 commits intoscikit-learn:masterfrom
edwardcqian:15222_split
Feb 11, 2020
Merged

documentation for random_state in model_selection/split#15575
glemaitre merged 13 commits intoscikit-learn:masterfrom
edwardcqian:15222_split

Conversation

@edwardcqian
Copy link
Copy Markdown
Contributor

@edwardcqian edwardcqian commented Nov 9, 2019

Reference Issues/PRs
part of this issue: #15222

What does this implement/fix? Explain your changes.
This PR improves the documentation for KFold, StratifiedKFold, _RepeatedSplits, RepeatedKFold, RepeatedStratifiedKFold, ShuffleSplit, GroupShuffleSplit, StratifiedShuffleSplit, and train_test_split by identifying the effects of randomness. Only the sklearn/model_selection/_split.py file was changed.

@edwardcqian edwardcqian changed the title added docs for KFold documentation for random_state in model_selection/split Nov 9, 2019
@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented Jan 8, 2020

Dear @edwardcqian , sorry, this PR went probably lost during the 0.22 release process.
We are planning to reuse the issue you addressed in the next sprints: could you please let us know if are still willing to finalize this PR? If yes, maybe @NicolasHug could take a look at it?
Thanks for your patience and collaboration.

@NicolasHug
Copy link
Copy Markdown
Member

Thanks for the PR @edwardcqian, it looks good. On top of @cmarmo 's comments, please add something like :

Set to an int for reproducible splits across calls to split

for every docstring.

Copy link
Copy Markdown
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

Some other nitpicks

@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented Jan 22, 2020

Thanks @edwardcqian! Could you please sync with master, as there are some conflicts to manage.

@NicolasHug
Copy link
Copy Markdown
Member

Also please address #15575 (comment)

Copy link
Copy Markdown
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

nevermind, it looks like it was addressed in another PR.

Last comment and LGMT

@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented Jan 27, 2020

@edwardcqian in the meanwhile some conflicts arised: could you please sync with master? Then maybe @glemaitre could finalize his review? Thanks to both of you!

@glemaitre glemaitre self-requested a review February 11, 2020 16:33
Comment on lines +1094 to +1095
Passes `random_state` to the arbitrary repeating cross validator. Pass
an int for reproducible output across multiple function calls.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

new line

Comment on lines +1198 to +1199
Random state used to control the randomness of each repeated
cross-validation instance.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Controls the randomness of each repeated cross-validation instance.

random_state : int or RandomState instance, default=None
Pass an int for reproducible output across multiple
function calls.
Random state to be used to generate random state for each repetition.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Controls the generation of the random states for each repetition."

@glemaitre glemaitre merged commit 0904058 into scikit-learn:master Feb 11, 2020
@glemaitre
Copy link
Copy Markdown
Member

@edwardcqian I pushed a couple of fixes and merged. Thanks for your contribution

thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
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.

5 participants