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_state
is the seed used by the random number generator;If
RandomState
instance, random_state is the random number generator;If
None
, the random number generator is theRandomState
instance used bynp.random
.
- n_runsint
Number of initializations.
- Returns:
- random_stateslist
A list of random states with length
n_runs
.