Is the Train Test Split randomised or deterministic?

Modified on Mon, 19 Dec, 2022 at 5:15 PM

The train test split is done randomly. Each time you rerun the train test split the two resulting data sets are different. Moreover, if you load the same data set into a new train test split step the result will be different. If you want to use the same train and test sets, you should do it once and then reuse the same data sets. You might need to export the data sets and import them in other notebooks.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article