Update Day 2_Simple_Linear_Regression.py

This commit is contained in:
wengJJ
2018-09-06 22:15:12 +08:00
committed by GitHub
parent 55572b8bd5
commit 3d5847ed59

View File

@ -7,7 +7,7 @@ dataset = pd.read_csv('../datasets/studentscores.csv')
X = dataset.iloc[ : , : 1 ].values
Y = dataset.iloc[ : , 1 ].values
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 = 1/4, random_state = 0)
# Fitting Simple Linear Regression Model to the training set