chapter seven

7 Deterministic forecasting with TimesFM

 

This chapter covers

  • Exploring the architecture of TimesFM
  • Zero-shot forecasting with TimesFM
  • Predicting with exogenous features

All foundation models that we have discovered so far are probabilistic forecasting models, meaning that they output a future probability distribution for each step in the forecast horizon. This allows us to derive arbitrary quantiles and quantify the uncertainty of the outcome as prediction intervals.

While this approach does provide a more complete view of the future, it also requires more processing steps of a model’s output. Plus, it is also possible that we are only interested in the point forecast and not the intervals. This is especially useful in situations where a definitive forecast is necessary for planning purposes, rather than a range of possible values.

This is where TimesFM comes into play, as a deterministic foundation forecasting model developed by Google Research [1].

In this chapter, we first explore the architecture of TimesFM which borrows many components from Moirai but in a decoder-only Transformer. We also examine the pretraining protocol, and then apply the model for zero-shot forecasting.

7.1 Examining TimesFM

7.1.1 Architecture of TimesFM

7.1.2 Pretraining TimesFM

7.2 Forecasting with TimesFM

7.2.1 Zero-shot forecasting with TimesFM

7.2.2 Cross-validation with TimesFM

7.2.3 Forecasting with exogenous features

7.3 On fine-tuning TimesFM and anomaly detection

7.4 Next steps

7.5 Summary