Transfer learning applies a pretrained model to a dataset or task it has not seen, relying on the model’s ability to generalize knowledge from previous data. section 2.3
Use transfer learning through two main modes:
- Generate zero-shot predictions by passing the new data to the pretrained model without training on it. section 2.11 section 2.5
- Fine-tune the pretrained model for a few training steps so it specializes in the target task. section 2.11
- Prefer it when the target dataset is too small to train a task-specific model, reducing development time and cost while data accumulates. section 2.3
Zero-shot forecasting for a new product
A forecasting model pretrained on the monthly M3 dataset can predict antidiabetic-drug prescriptions in Australia, even though it has never seen that series. Reserve the final 12 observations for testing, load the model, and call predict on the earlier observations without additional training. section 2.3 section 2.5
Listing 2.9 Zero-shot forecasting with our pretrained model
zero_shot_preds = pretrained_model.predict(input_df) zero_shot_preds.head()
Inspect the minimal prediction step that applies a loaded pretrained model to previously unseen time-series data. section 2.5










