Scailing
Hi everyone,
I'm a bit confused about the scaling process for the TTM model, and I was hoping someone could clarify this for me. The documentation states, "Users have to externally standard scale their data independently for every channel before feeding it to the model (Refer to TSP, our data processing utility for data scaling)."
In the ttm_tutorial example, we use the following method to scale the data:
tsp = TimeSeriesPreprocessor(
**column_specifiers,
context_length=context_length,
prediction_length=forecast_length,
scaling=True,
encode_categorical=False,
scaler_type="standard",
)
After I fine-tune and save the model, and I want to use it to make predictions after, do I need to scale the input data again?
If scaling is required, should I use a new scaler instance, or is it crucial to save the scaler from the TimeSeriesPreprocessor used during training? If saving the scaler is necessary, is there an easy way to do this?
Thanks a lot for your help!
Hi,
Yes, you could save the preprocessor so that the same scaling can be applied during inference (i.e., scaling factors are learned only on the training data). Saving the preprocessor can be done with:
tsp.save_pretrained(path_to_folder)
You can use the same path_to_folder
that was used when saving the model.
Thanks a lot, @wmgifford !