forecastML icon indicating copy to clipboard operation
forecastML copied to clipboard

Cross-temporal forecasts

Open nredell opened this issue 4 years ago • 5 comments

Now that this package is relatively stable and tested, let's make it more feature complete prior to v1.0.0.

The goal will be to implement the temporal and hierarchical forecast reconciliation approach detailed at the link below. The aim will be to work this functionality seamlessly into combine_forecasts(). Fewer functions with more arguments has, in my opinion, made for a clean API thus far.

In the spirit of this package, I want things to just work while being maximally flexible. As a result, I'll probably add 1 helper function that prepares forecasts produced from other packages so that they can be combined with those from forecastML.

Cross-temporal coherent forecasts for Australian tourism

nredell avatar May 06 '20 21:05 nredell

reconcile_forecasts() will be the new function.

nredell avatar May 13 '20 18:05 nredell

Temporal forecast reconciliation has been added; still need to add hierarchical and cross-temporal that does both groups and planning horizons simultaneously.

Incoming notebook that combines an ML model at the weekly level with statistical models at the monthly and quarterly levels.

nredell avatar May 19 '20 16:05 nredell

The temporal forecast reconciliation notebook has been uploaded.

nredell avatar May 21 '20 07:05 nredell

Working on hierarchical and grouped time series reconciliation now. This should fit nicely with the existing API for reconcile_forecasts() with a single optional argument, keys = NULL, if you're passing in forecasts from a bunch of different R packages and want to explicitly identify grouping columns because the input forecast dataframes for reconciliation have other random columns.

If I've got this right, and it'll be tested before the next CRAN release, the hierarchical reconciliation should happen auto-magically without explicitly having to specify the groups. The input hierarchical/grouped forecasts will be in long format as opposed to wide which matches this package and is the format you'd expect. Coming soon.

nredell avatar Jun 05 '20 06:06 nredell

Added reconcile_forecasts(method = "group") with examples in the docs.

This method works with both hierarchical/nested and grouped but non-nested forecasts.

Seems to be working, but unit tests are needed. Next up is the simultaneous reconciliation of temporal and grouped forecasts. Hopefully I can make the function internals more elegant when I see how these two slices come together.

nredell avatar Jun 06 '20 21:06 nredell