How do you predict the value of new instance, when the training data were normalized? I estimated a Partial Least Squares model where the X matrix had normalized columns. Now I want to predict the value for a new instance (which is a frequency vector summing to one.) I assume that if I just use the raw frequency values, the predicted value won't be on the same scale as the scenario where my 'new' instance was taken from the normalized X matrix. (i.e. Comparing the fitted values of the model with predicted value of new instance.)
I was thinking of adding the new instance as the bottom row of the original non-normalized X matrix, normalizing, and then using the values from this new bottom row to predict.
Alternatively, I could standardize by using the column means and standard deviations from the original non-normalized X. 
Is one method preferred to the other? Is there a better way?
 A: The normalization takes place with following steps:


*

*The mean of each variable is subtracted from that variable.

*Each variable is then divided by the standard deviation(stddev) of
that variable


So you have mean and stddev from the unnormalized X.
The most common way is to use this mean and stddev to normalize the new data with the same steps but on your new data to be predicted. Thus, your last suggestion is both correct and common.
In addition, you can also add intercept term to the BETA matrix/vector obtained from PLS model that would represent the mean-centering step. Additionally, you can also recalculate the BETA once more to give the division with stddev effect.
Adding new data to the training set (your original X matrix) and then normalizing it, however, is not a correct way. This makes the scaling and more importantly your mean, which acts like an intercept term, dependent to the training data AND your new data combined. It would lead to unreliable results. You can also test and see these two methods produce different results.
A: I normalized the sample data based on the values in the training dataset:
sample_data['col1'] = (sample_data['col1'] - training_data['col1'].min()) / (training_data['col1'].max() - training_data['col1'].min())
sample_data['col2'] = (sample_data['col2'] - training_data['col2'].min()) / (training_data['col2'].max() - training_data['col2'].min())
sample_data['col3'] = (sample_data['col3'] - training_data['col3'].min()) / (training_data['col3'].max() - training_data['col3'].min())
... an so on.

You sample data will be normalized according to your training data and you can start doing your predictions.
