0
$\begingroup$

I am trying to apply standard scaler on my data for classification prediction.
But one of the feature will increase over time e.g. lifetime count, days since join
Should I apply the standard scaler to the dataset like the normal way?

from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.transform (X_test)

or fit and transform the data every time to keep the mean as 0?

from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.fit_transform (X_test)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.