Update Day 1_Data_Preprocessing.md
最新版本train_test_split 在 sklearn.cross_validation from sklearn.cross_validation import train_test_split
This commit is contained in:
@ -42,7 +42,8 @@ Y = labelencoder_Y.fit_transform(Y)
|
||||
```
|
||||
## 第5步:拆分数据集为训练集合和测试集合
|
||||
```python
|
||||
from sklearn.model_selection import train_test_split
|
||||
#from sklearn.model_selection import train_test_split
|
||||
from sklearn.cross_validation import train_test_split
|
||||
X_train, X_test, Y_train, Y_test = train_test_split( X , Y , test_size = 0.2, random_state = 0)
|
||||
```
|
||||
## 第6步:特征量化
|
||||
|
||||
Reference in New Issue
Block a user