ModuleNotFoundError: No module named ‘sklearn.cross_validation‘
原来:from sklearn.cross_validation import train_test_split运行报错:修改:将sklearn.cross_validation修改成sklearn.model_selectionfrom sklearn.model_selection import train_test_split原因:目前train_test_split已被cross_validation被废弃了,现在改为从sklearn.model_selec.
原创
2020-12-18 22:39:26 ·
159 阅读 ·
1 评论