0
$\begingroup$

I am currently trying to apply Linear Regression model to test the relationship between two variables $X$ and $Y$. Given a dataset with $8$ columns and $1000$ rows, I want to split this dataset into training and test sets using split_train_test. But i wonder what is the difference between split_train_test(dataset, test_size, random_test = int) vs split_train_test(dataset, test_size).Also, does the 2nd one (without setting random_test=int) give me a different test set and training set each time I re-run my program? Does the 1st one give me the same test set and training set every time I re-run my program? What is the difference between setting random_test=42 vs random_test=43, for example?

$\endgroup$
0
$\begingroup$

Yes, the first gives you the same split because you passing a Seed to the random number generator. If you change the random number you get different split. Using seed numbers you can reproduce experiments.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.