You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pycharm, and when running the program, it sends the following error message: "ImportError: cannot import name 'cross_validation' from 'sklearn' "
Which command replaced the cross_validation function?
The text was updated successfully, but these errors were encountered:
You can replace it with "from sklearn.model_selection import train_test_split" instead of "from sklearn import cross_validation".
So you can immediately use it here:
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=5)
Instead of:
X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.25, random_state=5)
I'm using pycharm, and when running the program, it sends the following error message: "ImportError: cannot import name 'cross_validation' from 'sklearn' "
Which command replaced the cross_validation function?
The text was updated successfully, but these errors were encountered: