One model per step
Train one model to predict each step of the forecasting horizon
By default mlforecast uses the recursive strategy, i.e. a model is trained to predict the next value and if we’re predicting several values we do it one at a time and then use the model’s predictions as the new target, recompute the features and predict the next step.
There’s another approach where if we want to predict 10 steps ahead we
train 10 different models, where each model is trained to predict the
value at each specific step, i.e. one model predicts the next value,
another one predicts the value two steps ahead and so on. This can be
very time consuming but can also provide better results. If you want to
use this approach you can specify max_horizon
in
MLForecast.fit
,
which will train that many models and each model will predict its
corresponding horizon when you call
MLForecast.predict
.
Setup
Data
We will use four random series from the M4 dataset
Model
individual | recursive | |
---|---|---|
unique_id | ||
H196 | 0.3% | 0.3% |
H256 | 0.4% | 0.3% |
H381 | 20.9% | 9.5% |
H413 | 11.9% | 13.6% |