dimanche 12 février 2017

Python random state in splitting dataset

I'm kind of new to python. can anyone tell me why we set random state to zero in splitting train and test set.

X_train, X_test, y_train, y_test = \ train_test_split(X, y, test_size=0.30, random_state=0)

i have seen situations like this where random state is set to one!

X_train, X_test, y_train, y_test = \ train_test_split(X, y, test_size=0.30, random_state=1)

what is the consequence of this random state in cross validation as well?




Aucun commentaire:

Enregistrer un commentaire