Avik-Jain / 100-Days-of-ML-Code-Chinese-Version

Chinese Translation for Machine Learning Infographics
MIT License
3.35k stars 920 forks source link

代码中的from sklearn.cross_validation import train_test_split 在scikit-learn中没有 #8

Open Stoneww opened 5 years ago

Stoneww commented 5 years ago

老铁用的sklearn那个版本啊,我用的最新版的,没有 from sklearn.cross_validation import train_test_split 这个东西啊

jackycsie commented 5 years ago

You can try this code. from sklearn.model_selection import train_test_split X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.25, random_state = 0)