ImportError: No module named sklearn.cross_validation

后端 未结 14 1947
天涯浪人
天涯浪人 2020-12-04 08:14

I am using python 2.7 in Ubuntu 14.04. I installed scikit-learn, numpy and matplotlib with these commands:

sudo apt-get install build-essential python-dev p         


        
相关标签:
14条回答
  • 2020-12-04 08:50

    Splitting the dataset into the Training set and Test set

    from sklearn.model_selection import train_test_split
    
    0 讨论(0)
  • 2020-12-04 08:51

    It must relate to the renaming and deprecation of cross_validation sub-module to model_selection. Try substituting cross_validation to model_selection

    0 讨论(0)
提交回复
热议问题