carlomazzaferro / scikit-hts-examples

Example usage of scikit-hts
MIT License
53 stars 22 forks source link

Example of how to apply top-down, middle-out, bottom-up approach. #6

Open an5ir opened 3 years ago

an5ir commented 3 years ago

Hi,

In the fpp2 book on the chapter Forecasting hierarchical or grouped time series, it is possible to easily switch between different methods (top-down, middle-out, bottom-up) when using the hts approach.

prison.gts <- gts(prison/1e3, characters = c(3,1,9),
  gnames = c("State", "Gender", "Legal",
             "State*Gender", "State*Legal",
             "Gender*Legal"))
forecast(prison.gts, method="bu", fmethod="arima")

can you provide an example of how this can be done using scikit-hts package

javierhuertay commented 3 years ago

As i understood, you can simply change the revision_method by any of those, image

By the moment I'm not being able to use BU (Some key error), but all of the others works well at least with auto arima.

Hope this help