1
$\begingroup$

Let's say I have a basic regression model being used in production and now I want to implement periodical model retraining (i.e. once a month) where I take a batch of new data from last month and fit old model on this new batch with one epoch only.

Assuming that model is using MinMaxScaler as feature normalization mechanism, how should I proceed with scaling during such automated periodical retraining? Should I scale the data with old scaler, that was fitted on the initial training set or should I somehow fit the scaler again but if so, on what data? Only the newest batch or newest concatenated with the old initial training set?

$\endgroup$

1 Answer 1

0
$\begingroup$

This is a more intuitive answer, not backed by some statistical learning theory:

You want to implement an online model, i.e. you adapt your working model with new incoming data. So you keep the old, just change it a little. Now, the MinMaxScaler is arguably part of your model, so you should handle it the way you handle your model: keep the old, just change it a little. That means you should take your second suggestion in the OP: build the scaler with the concatenation of new and old training data.

When I build online models, I usually try to make sure that the model not just learns about the new data, but that it also forgets about the oldest ones. Adapted to your situation, that would mean to just shift a fixed-size time window over your data each month, i.e. take in the new month and throw out the oldest month. Then completely retrain your scaler and your model each month on the current window.

$\endgroup$
2
  • $\begingroup$ If you are satisfied with the answer, please accept it. If not, you could consider leaving a comment detailing what you are missing. $\endgroup$
    – frank
    Mar 19, 2022 at 6:34
  • $\begingroup$ Interesting argument, thank you. However, if you wanted to re-use the previous models weights, would you fit the min-max scaler from scratch and then just train normally? $\endgroup$
    – chemeng
    Jun 25 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.