-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
documentation for random_state in model_selection/split #15575
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
Dear @edwardcqian , sorry, this PR went probably lost during the 0.22 release process. |
Thanks for the PR @edwardcqian, it looks good. On top of @cmarmo 's comments, please add something like :
for every docstring. |
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.
Some other nitpicks
Thanks @edwardcqian! Could you please sync with master, as there are some conflicts to manage. |
Also please address #15575 (comment) |
ab3490d
to
c6d178e
Compare
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.
nevermind, it looks like it was addressed in another PR.
Last comment and LGMT
@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! |
sklearn/model_selection/_split.py
Outdated
Passes `random_state` to the arbitrary repeating cross validator. Pass | ||
an int for reproducible output across multiple function calls. |
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.
new line
sklearn/model_selection/_split.py
Outdated
Random state used to control the randomness of each repeated | ||
cross-validation 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.
Controls the randomness of each repeated cross-validation instance.
sklearn/model_selection/_split.py
Outdated
@@ -1247,8 +1249,8 @@ class RepeatedStratifiedKFold(_RepeatedSplits): | |||
Number of times cross-validator needs to be repeated. | |||
|
|||
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. |
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.
"Controls the generation of the random states for each repetition."
@edwardcqian I pushed a couple of fixes and merged. Thanks for your contribution |
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
, andtrain_test_split
by identifying the effects of randomness. Only thesklearn/model_selection/_split.py
file was changed.