Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in bottom_up() #266

Closed
GeorgeAthana opened this issue Sep 18, 2020 · 1 comment
Closed

Bug in bottom_up() #266

GeorgeAthana opened this issue Sep 18, 2020 · 1 comment

Comments

@GeorgeAthana
Copy link
Contributor

tourism_full <- tsibble::tourism %>% aggregate_key((State/Region)*Purpose, Trips = sum(Trips))
tourism_fit_ets <- tourism_full %>%
filter(year(Quarter)<=2015) %>%
model(
ets=ETS(Trips),
) %>%
reconcile(
bu_ets = bottom_up(ets),
wls_ols = min_trace(ets, method="ols")
)

tourism_fc_ets <- tourism_fit_ets %>%
forecast(h="2 years")

tourism_fc_ets %>%
filter(is_aggregated(State),is_aggregated(Region),!is_aggregated(Purpose)) %>%
autoplot(tourism_full, level=NULL) +
facet_wrap(vars(Purpose), scales = "free_y")

tourism_fc_ets %>%
filter(!is_aggregated(State),is_aggregated(Region),is_aggregated(Purpose)) %>%
autoplot(tourism_full, level=NULL) +
facet_wrap(vars(State), scales = "free_y")

@mitchelloharawild
Copy link
Member

Issue is rooted in redundant nodes, fixed in 251fcc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants