Skip to content

Better documentation for random_state #15222

@NicolasHug

Description

@NicolasHug

Sort of like #14228, but for random_state.

For any public object that accepts a random_state parameter, we should document what parts of the algorithm are randomized. It's not always obvious what is and what isn't randomized. We should also always link to the glossary, where the different possible values of random_state are clearly explained.

For example for the random forest estimators, it would be helpful to indicate that random_state determines in particular the subsampling of the samples and the subsampling of the features. Something like:


random_state : int, np.random.RandomStateInstance or None, default=None
	Controls the randomness of the estimator, in particular the subsampling
    of the samples and the subsampling of the features. See 
	term:`random_state` for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationModerateAnything that requires some knowledge of conventions and best practiceshelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions