Reputation: 11
I have some questions about Normalization: When you extract features and you want to normalize your features before classification. How do you do normalize the features ( e.g. the two classes you have)? 1- Do you normalize each class seperatly? or you normalize the two classes together? 2- Do you normalize the whole data before spliting trianing and testing ? or you normalize training first , then normalize each new testing sample separately? 3- Any Reference? book or paper?
Upvotes: 0
Views: 225
Reputation: 11
*Do you normalize the whole data before spliting trianing and testing ?*
There is no need to split the data for training and testing
Code :
from sklearn.preprocessing import StandarScaler
sc_X = StandardScaler()
sc_y = StandardScaler()
x = sc_X.fit_transform(X)
y = sc_y.fit_transform(y)
thanks
Upvotes: 0