ImportError: cannot import name ‘cross_validation’ from ‘sklearn’ [duplicate]

cross_validation is deprecated since version 0.18. This module will be removed in 0.20.

Use sklearn.model_selection.train_test_split instead.

from sklearn.model_selection import train_test_split

More:
sklearn 0.19 docs

Leave a Comment