Skip to content

Conversation

marenwestermann
Copy link
Member

Reference Issues/PRs

towards #21350

What does this implement/fix? Explain your changes.

Corrects the return type of the function check_random_state in sklearn/utils/validation.py.

Any other comments?

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

Comment on lines 1174 to 1175
``RandomState``
The appropriate ``RandomState`` based on the input.
Copy link
Member

Choose a reason for hiding this comment

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

We can link to RandomState object from NumPy and be explicit about the seed parameter:

Suggested change
``RandomState``
The appropriate ``RandomState`` based on the input.
:class:`numpy:numpy.random.RandomState`
The random state object based on `seed` parameter.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan merged commit 05d5f0a into scikit-learn:main May 12, 2022
@marenwestermann marenwestermann deleted the check-random-state branch May 12, 2022 14:47
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request May 19, 2022
Co-authored-by: Maren Westermann <maren.westermann@free-now.com>
glemaitre pushed a commit that referenced this pull request May 19, 2022
Co-authored-by: Maren Westermann <maren.westermann@free-now.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants