From 75f992bd74914911bdd916f7347062d56117534f Mon Sep 17 00:00:00 2001 From: leopardary Date: Sun, 12 Aug 2018 06:32:45 -0700 Subject: [PATCH] on line #20, changing test_size from "1/4" to "1.0/4" the original version, "1/4" would equal to zero... --- Code/Day2_Simple_Linear_Regression.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Day2_Simple_Linear_Regression.md b/Code/Day2_Simple_Linear_Regression.md index e420646..1c4c52e 100644 --- a/Code/Day2_Simple_Linear_Regression.md +++ b/Code/Day2_Simple_Linear_Regression.md @@ -17,7 +17,7 @@ X = dataset.iloc[ : , : 1 ].values Y = dataset.iloc[ : , 1 ].values from sklearn.cross_validation import train_test_split -X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1/4, random_state = 0) +X_train, X_test, Y_train, Y_test = train_test_split( X, Y, test_size = 1.0/4, random_state = 0) ``` # Step 2: Fitting Simple Linear Regression Model to the training set