File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2525
2626# scale X_train and X_test
2727from 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
Original file line number Diff line number Diff line change 2525
2626# scale X_train and X_test
2727from 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 )
You can’t perform that action at this time.
0 commit comments