From 73d3d6a6d4571e2c2be38dacb91ba41a4b7806d5 Mon Sep 17 00:00:00 2001 From: Gaurav Padole Date: Sun, 29 Sep 2024 16:33:02 +0530 Subject: [PATCH] Made changes in Feature Scaling part in Day 1 code --- Code/Day 1_Data PreProcessing.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Code/Day 1_Data PreProcessing.md b/Code/Day 1_Data PreProcessing.md index 569d0e6..53b0d10 100644 --- a/Code/Day 1_Data PreProcessing.md +++ b/Code/Day 1_Data PreProcessing.md @@ -47,7 +47,8 @@ X_train, X_test, Y_train, Y_test = train_test_split( X , Y , test_size = 0.2, ra ```python from sklearn.preprocessing import StandardScaler sc_X = StandardScaler() -X_train = sc_X.fit_transform(X_train) -X_test = sc_X.fit_transform(X_test) +sc_X.fit(X_train) +X_train = sc_X.transform(X_train) +X_test = sc_X.transform(X_test) ``` ### Done :smile: