liveBook · Manning

Data-specific model

As explained in Time Series Forecasting Using Foundation Models

A forecasting model designed and trained for a particular dataset, domain, or use case rather than broad general-purpose use.

A data-specific model is trained for one dataset, domain, or use case, specializing in its particular patterns rather than serving many situations. section 1.0

In forecasting, fit the model directly to the target series and its frequency. This can outperform a pretrained model when the data contains granular or domain-specific patterns, but requires a separate model for each situation. section 1.0 section 2.8

Evaluate a data-specific model by comparing it with a pretrained alternative:

  • Use a held-out test horizon and compare forecasts against actual values. section 2.8
  • Measure errors with metrics such as MAE and sMAPE rather than relying only on plots. section 2.8
  • Prefer it when the pretrained model misses the dataset’s frequency or domain-specific behavior. section 1.3.2 section 2.8

Daily temperature forecasting

A pretrained model trained only on monthly data produced daily forecasts with MAE 2.59 and sMAPE 8.69%. An N-BEATS model trained on the daily dataset achieved MAE 1.34 and sMAPE 4.87%. section 2.8

Listing 2.16 Training a data-specific model on the daily data
models = [NBEATS(input_size=2*horizon, h=horizon, max_steps=500)]

nf = NeuralForecast(models=models, freq='D')
nf.fit(df=d_input_df)
d_trained_preds = nf.predict()

Shows the minimal NeuralForecast setup for fitting an N-BEATS model specifically to daily data. section 2.8

How Time Series Forecasting Using Foundation Models covers it

How deep it goes
Demonstrates data preparation, model fitting, held-out prediction, plotting, and MAE and sMAPE evaluation.
Examples
Compares zero-shot and trained N-BEATS forecasts on a daily minimum-temperature dataset.
What it assumes
Assumes basic time-series data handling and forecasting evaluation while demonstrating the specialized training workflow.
What you can do after
Build it from scratch by fitting a forecasting model to a dataset and diagnosing its accuracy against a pretrained alternative.
How it connects
Connects data-specific models with foundation models, pretrained models, zero-shot forecasting, time-series forecasting, and N-BEATS.

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.