mlresearch.utils.check_random_states¶
- mlresearch.utils.check_random_states(random_state, n_runs)[source]¶
Create random states for experiments. Used to create seeds for different initializations.
- Parameters:
- random_stateint, RandomState instance, default=None
Control the randomization of the algorithm.
If int,
random_stateis the seed used by the random number generator;If
RandomStateinstance, random_state is the random number generator;If
None, the random number generator is theRandomStateinstance used bynp.random.
- n_runsint
Number of initializations.
- Returns:
- random_stateslist
A list of random states with length
n_runs.