liveBook · Manning

Transfer learning

As explained in Time Series Forecasting Using Foundation Models

Transfer learning is a technique that applies knowledge learned by a model on one dataset or task to a different dataset or task.

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

How Time Series Forecasting Using Foundation Models covers it

How deep it goes
Explains pretraining, zero-shot prediction, and fine-tuning, but demonstrates only zero-shot application.
Examples
Uses an N-BEATS model pretrained on monthly M3 series to forecast Australian antidiabetic-drug prescriptions.
What you can do after
Apply it via NeuralForecast by loading a pretrained model and generating predictions for an unseen time series.
How it connects
Connects transfer learning with pretrained models, foundation models, generalization, zero-shot prediction, fine-tuning, and time-series forecasting.

Also explained in

Compare how 11 books explain transfer learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Time Series Forecasting Using Foundation Models. The section links point to the parts of the book it draws on.