Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[MRG] Set random seed in init for CV splitters #15177
[MRG] Set random seed in init for CV splitters #15177
Changes from 7 commits
4b480e2
4ad8172
18897e5
d7be872
686e829
bcb58b2
d434d06
3b1b200
a755336
0cc83d0
f3b0abe
95b65bc
95873db
f934e53
eb1656e
3302fd9
47c924d
afbe187
0903af9
e231f99
38b54ef
4b569f6
25b71be
484c253
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not sure if this should be an error.
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.
We usually error when parameters combinations don't make sense, right?
That particular one has always been slightly confusing to me.
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.
yeah, with the other comment, now I see why this is very useful.
But this needs a whats_new entry of its own.
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.
you know what maybe I'll make a separate PR that we can quickly review. After all this is unrelated to the proposed changes.
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.
What are the benefits of having the repr work? With this PR, we do not need to hold on to
self.random_state
.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.
CI and tests not breaking ^^
If we remove the
random_state
attribute, it is rendered asrandom_state=None
(no matter the value) by the customrepr
.I feel like a reasonable fix would be to print the seed attr instead of the random_state, but didn't want to involve too many changes in the PR.
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 a clear change of semantics of what "random_state" means. I am not very comfortable with it, because it means that semantics of arguments vary across the library, which is bad for usability.
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.
Had to change seed else the repetitions would be equal (by chance)