# Feature normalization independent from test data

I know that it is good practice to perform normalization (subtracting the data by its mean and dividing it by its standard deviation) first on the training data, and in a later step to use the mean and standard deviation of the training data to normalize also the test data.

I am aware from feature selection, that the feature selection for supervised feature selection methods - i.e. feature selection methods which do make use of the class labels - must be done solely based on the training set. However, since normalization does not make use of any class labels, I wonder how the common practice described above is justified?

• When I am not at work I will see if I can get my hands on these. Do any of them say why this is does not bias the estimation of generalization error? I suppose one argument is that in the future if you are asked to predict $y$ from $x$, you have $x$ so you can technically refrain the feature selection. This fact does not apply in my application, but this could be the reason. I tend to look at testing as a way of testing an entire algorithm to estimate future performance, so I hold everything out. – jlimahaverford Sep 29 '15 at 18:38