Why do we set a random state in machine learning models?
random_state=42
Published in
6 min readApr 30, 2022
You may already use random state in your machine learning models. Do you know that random state is a model hyperparameter used to control the randomness involved in machine learning models?
In Scikit-learn, the random state hyperparameter is denoted by random_state
. It usually takes one of the following values.