Hierarchical time series forecasting using Fable in R

Viewed 137

I am doing hierarchical time series forecasting using fable. I am using 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 different forecasting method at each level(eg:sku/brand/product) and reconcile? If so, kindly let me know how to do it.

0 Answers
Related