Random state in train_test_split

whst is the use of random state=5…
what is its significance here

Hey @sankalparora5, random state is passed to produce same results on multiple machines, and between multiple runs. Means if you run this code again, the example which went into x_test, this time also it will go to the x_test. Similarly for all examples. No other significanec is there.

Hope this resolved your doubt.
Plz mark it as resolved :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.