I am supposed to standardize a training and a validation set "so that the training set has zero mean and unit $l_2$-norm". In order to do so I use the
data.normalization function from R's
normalizedtrainingset <- data.Normalization(trainingdata,type="n12",normalization="column")
which does do the trick for the training set. Now I am a bit confused about how to proceed with the validation set. I surely cannot use the same function because it would use the validation set's mean and sd and not the mean/sd from the training data. Thus, I proceeded like this:
validation.standardized <- (validation-mean(training))/sd(training)
This takes into account the mean and sd of the training set. However, the values in the validation set are still quite a bit larger than those of the training data because it has not been normalized. My question now is: do I divide the validationset by its own $l_2$-norm, do I divide it by the $l_2$-norm of the training set or do I not divide it at all and the values in the validation set have to remain larger than those in the training data (the latter seems unlikely).