ValueError: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True

Viewed 15803

When i try to train some thing in pycreat i recive this error message

ValueError: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True.

from pycaret.regression import *
clf1 = setup(data = df, target = 'Survived',train_size = 0.7, session_id = 2)

best=compare_models()
3 Answers

for pycaret 2.2.3

exp_clf101 = setup(data = df, target = 'Survived',  fold_shuffle=True, session_id=2)

You should try the following:

from pycaret.classification import *
clf1 = setup(data = df, target = 'Survived', train_size = 0.7, data_split_shuffle=True, session_id = 2)


best=compare_models()

Just had this issue. The problem was that scikit-learn version has had a major updated from version 0.X.X to 1.X.X, and Pycaret works with version 0.23.2.
Solution: re-install the older version in your env.

Related