Skip to content

Commit d2c091a

Browse files
author
Aaron England
authored
Add files via upload
1 parent 615fa8f commit d2c091a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Chapter 2/Exercises/Exercise_08.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525

2626
# scale X_train and X_test
2727
from sklearn.preprocessing import StandardScaler
28-
model = StandardScaler() # instantiate StandardScaler model
29-
X_train_scaled = model.fit_transform(X_train) # transform X_train to z-scores
30-
X_test_scaled = model.fit_transform(X_test) # transform X_test to z-scores
28+
scaler = StandardScaler() # instantiate StandardScaler model
29+
X_train_scaled = scaler.fit_transform(X_train) # transform X_train to z-scores
30+
X_test_scaled = scaler.fit_transform(X_test) # transform X_test to z-scores
3131

3232

3333

Chapter 2/Exercises/Exercise_12.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525

2626
# scale X_train and X_test
2727
from sklearn.preprocessing import StandardScaler
28-
model = StandardScaler()
29-
X_train_scaled = model.fit_transform(X_train)
30-
X_test_scaled = model.fit_transform(X_test)
28+
scaler = StandardScaler()
29+
X_train_scaled = scaler.fit_transform(X_train)
30+
X_test_scaled = scaler.fit_transform(X_test)

0 commit comments

Comments
 (0)