0
$\begingroup$

I am doing hierarchical time series forecasting using fable package in R. I am using the optimal reconciliation method to reconcile the forecast. Here is the example code.

agg_sw <- df %>%
  aggregate_key(productcategory/brand/sku, sales = sum(sales))

# Fit the model
ets_fit <- agg_sw %>%
  model(ets = ETS(sales)) %>%
  reconcile(ols = min_trace(ets, method = "ols"))

# Forecast
fc <- forecast(ets_fit, h= "1 year")

enter image description here

Is it possible to use a different forecasting method at each level (e.g., sku/brand/product) and reconcile? If so, kindly let me know how to do it.

$\endgroup$
0

1 Answer 1

0
$\begingroup$

You can use any model that you like to forecast each series in the hierarchy. However, the fable package only supports a few forecasting models including ets, tslm for automatic reconciliations. If you want to use a random forest or deep learning model, you can do so but you need to either write your own wrapper to use fable (see https://fabletools.tidyverts.org/articles/extension_models.html), or write the reconciliation function separately to do the hierarchical forecasting reconciliations.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.