How to implement the feature scaling in prediction?

Hi,

In the rescaling section from lab03, it’s mentioned that if we use z-score normalization then we need to keep the mean and standard error calculated from the training set, so that in prediction we can use these values to normalize the new features.

I wondered if that’s also the case if we use the mean normalization or the general feature scaling (dividing by max), where we should keep the min/max/average values from the training set and use them to scale the features in the test set? Would there be cases where the scaling values from the training set do not work well on the test set features?

Hello,

Yeah in production environments other feature scaling values from the training set will be needed when used for prediction, so they will be stored too. A “serving signature” graph from the training process is produced for transforming input ready for the model. Then this graph (function) will be incorporated to predictions serving requests.

In time there will be changes in the data comming for prediction (as the world changes) so these feature scaling constants will differ for the test set, and thats why the model is retrained regularly to keep up with the changes in the real world data.