So when I try to run some code featuring the line below:
X_train, X_test, Y_train, Y_test=train_test_split(X_features, Y_feature, test_size=0.2, random_state=42, stratify=None, shuffle=False)
I get the following error:
TypeError: Invalid parameters passed: {'shuffle': False}
Yet, the 'shuffle' parameter is listed on scikitlearn website (http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html).
I tried different order for parameters, splitting X and Y separately, but that yielded no result. Is there any other way I could prevent train_test_split from randomizing the data?
Shuffle has been introduced in 0.19, you are probably using 0.18 or older which was following different API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With