Creating GFMs
Training a GFM is very straightforward. While we were training LFMs in Chapter 8, Forecasting Time Series with Machine Learning Models, we were looping over different households in the London Smart Meters dataset and training a model for each household. However, if we just take all the households into a single dataframe (our dataset is already that way) and train a single model on it, we get a GFM. One thing we want to keep in mind is to make sure that all the time series in the dataset have the same frequency. In other words, if we mix daily time series with weekly ones while training these models, the performance drop will be noticeable – especially if we are using time-varying features and other time-based information. For a purely autoregressive model, mixing time series in this way is much less of a problem.
Notebook alert
To follow along with the complete code, use the notebook named 01-Global Forecasting Models-ML.ipynb
in the chapter10
folder.