Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC correct return type of check_random_state #23320

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
May 12, 2022

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
glemaitre pushed a commit that referenced this pull request May 19, 2022
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