I've just started building models in Machine Learning and I was wondering why do we have t0 create a random_state variable when we split the data.
Asked
Active
Viewed 160 times
1 Answers
1
It saves how the split was made. If you were to use the same data and the same random state it would produce the same train test split. This is useful if you want to train two+ models on the same data and compare them. Using the same data and the same random split will ensure the models were trained on the same data, allowing for apples-to-apples comparison of performance

user11924246
- 174
- 7
-
Thanks. That sort of cleared things up. Maybe once I keep building and learning more..I'll understand it better. – Siddarth Krishna S Aug 13 '19 at 22:32