module 'sklearn' has no attribute 'cross_validation'

后端 未结 5 922
-上瘾入骨i
-上瘾入骨i 2021-02-06 22:11

I am trying to split my dataset into training and testing dataset, but I am getting this error:

X_train,X_test,Y_train,Y_test = sklearn.cross_validation.train_te         


        
5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-06 22:18

    you can try this

    X_train,X_test,Y_train,Y_test = 
        sklearn.model_selection.train_test_split(X,boston_df.price)
    

提交回复
热议问题