Update Day 3_Multiple_Linear_Regression.py

This commit is contained in:
wengJJ
2018-09-06 22:27:54 +08:00
committed by GitHub
parent 3eb553227d
commit d263be841e

View File

@ -18,7 +18,7 @@ X = onehotencoder.fit_transform(X).toarray()
X = X[: , 1:]
# Splitting the dataset into the Training set and Test set
from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.2, random_state = 0)
# Fitting Multiple Linear Regression to the Training set