watex.utils.funcutils.random_state_validator#
- watex.utils.funcutils.random_state_validator(seed)[source]#
Turn seed into a np.random.RandomState instance.
- Parameters
seed (None, int or instance of RandomState) – If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it. Otherwise raise ValueError.
- Returns
The random state object based on seed parameter.
- Return type
numpy:numpy.random.RandomState