The module 'sklearn.cross_validation' has been deprecated and renamed to 'sklearn.model_selection' in recent versions of scikit-learn.

To fix the error, you need to update your code to import from 'sklearn.model_selection' instead of 'sklearn.cross_validation'. Here's an example:

from sklearn.model_selection import train_test_split

# Rest of your code...

Make sure you have the latest version of scikit-learn installed. You can update it using the following command:

pip install --upgrade scikit-learn
``
No module named sklearncross_validation

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

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