This error occurs when you try to import a module that does not exist in the Scikit-learn library. The module 'sklearn.cross_validation' has been deprecated and is now called 'sklearn.model_selection'.

To fix this error, replace the line of code:

from sklearn.cross_validation import train_test_split

with:

from sklearn.model_selection import train_test_split

This should resolve the issue and allow you to use the train_test_split function from the Scikit-learn library

ModuleNotFoundError No module named sklearncross_validation

原文地址: https://www.cveoy.top/t/topic/dHV3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录