from sklearn.cross_validation import train_test_split
ERROR:
ImportError: No module named sklearn.cross_validation
Solution:
it must relate to therenaming and depreaction ofcross_validation
submodule tomodel_selection
. Try substitutingcross_validation
->model_selection
train_test_split is now in model_selection. Just type:
from sklearn.model_selection import train_test_split
Reference:
https://stackoverflow.com/questions/30667525/importerror-no-module-named-sklearn-cross-validation
Similar Posts:
- Pycharm Error: ImportError: No module named model_selection
- Problems and solutions in running tensorflow
- No module named ‘sklearn.model_selection [How to Solve]
- How to Solve ModuleNotFoundError: No module named ‘sklearn.grid_search‘
- [Solved] Validation failed for one or more entities. See ‘EntityValidationErrors’
- ValueError: day is out of range for month [How to Solve]
- ValueError: day is out of range for month [How to Solve]
- NoClassDefFoundError: javax/validation/constraints/Size [How to Solve]
- Python Ssl.certificateerror errors [How to Solve]
- Preservation and recovery of TF. Train. Saver () model of tensorflow