No module named ‘sklearn.cross_validation’

As pointed out by @amit-gupta in the question above, sklearn.cross_validation has been deprecated. The function train_test_split can now be found here:

from sklearn.model_selection import train_test_split

Simply replace the import statement from the question to the one above.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)