mlforecast icon indicating copy to clipboard operation
mlforecast copied to clipboard

[forecast]: allow for "batched" forecasting

Open gofford opened this issue 1 year ago • 2 comments

Description

mlforecast currently allows for recursive single-model forecasts, or direct multi-model forecasts where a single model is trained to predict a particular data point in the horizon.

A third option here is a middle ground between recursive and direct. In this option, multiple models can be trained but each is responsible for predicting a "batch" of the forecast horizon recursively. This is useful for long forecasting horizons with high resolution data.

Use case

Consider the case were I wish to predict the next 13 weeks of sales at a daily resolution. My options here are to have either 1 recursive model, which will have degrading performance with increasing horizon due to compounded error, or 91 individual forecasting models where each model trains a particular day ahead. Neither of these are ideal.

I can aggregate to weekly level, but I lose the daily resolution which is important for tracking the impact of things like promotions and daily events.

An alternative model that I have used in the past would be to have 13 models, where each model predicts a sequence of 7 steps (1 week).

gofford avatar Oct 17 '23 15:10 gofford

Hey @gofford, thanks for the suggestion. Just to be clear, what you'd like to have is train model1 to predict 1 step ahead and use it to predict the first seven steps ahead, train model2 to predict 8 steps ahead and use it to predict the next seven steps ahead and so on?

jmoralez avatar Jan 23 '24 16:01 jmoralez

Hey @jmoralez, pretty much! Although I'm not 100% sure that it's only a 1-step ahead forecast. When I've built similar (tree-based) forecasters manually I've trained and validated against the fit to the week as a whole, rather than a single point. I think we're talking about the same thing though.

gofford avatar Jan 23 '24 17:01 gofford