Open StefJen opened 2 years ago
Thanks for the issue, I have seen your stackoverflow post but this is a more appropriate place for it. I believe this is a bug, and will work on fixing it as part of a reconciliation rework.
Thanks for the issue, I have seen your stackoverflow post but this is a more appropriate place for it. I believe this is a bug, and will work on fixing it as part of a reconciliation rework.
Will make sure to post here another time if I discover something - new to this GitHub universe 👍
Same Problem even with Top Down now working more than two levels, I get this error :
tourism <- tsibble::tourism %>%
mutate(State = recode(State,
New South Wales
= "NSW",
Northern Territory
= "NT",
Queensland
= "QLD",
South Australia
= "SA",
Tasmania
= "TAS",
Victoria
= "VIC",
Western Australia
= "WA"
)) %>%
mutate(NewCol = paste(State,"ABC",sep="")) %>%
aggregate_key(NewCol / State / Region, Trips = sum(Trips)) %>%
model(ets=ETS(Trips)) %>%
reconcile(mo_ets = top_down(ets),
method = "forecast_proportions",
level=State) %>%
forecast(h=3)
Error in mutate_cols()
:
! Problem with mutate()
column mo_ets
.
ℹ mo_ets = (function (object, ...) ...
.
x subscript out of bounds
Caused by error in t(rowsum(t(fc_mean[, agg_child_loc, drop = FALSE]), agg_parent))[, agg_parent]
:
! subscript out of bounds
Run rlang::last_error()
to see where the error occurred.
+1
Is there any workaround to make top_down work with 4 levels? it's a must have in any strict hierarchical benchmarking
I'm trying to do a middle-out forecast with a hierarchy of several levels, however when I try with a hierarchy that is more than 2 levels, then I run into this error:
Using the below code works without any issues:
But adding another level to the hierarchy, so that we now have three instead of two, then I get the error:
Reverting to just two levels would in practice mean using a top-down or bottom-up approach, and I'm looking to achieve a true middle-out forecast in a setting with multiple levels. For my specific use case I need 4-7 levels.
My session info for reference:
Also posted on stackoverflow