Skip to content

Conversation

@AngelPone
Copy link

see #352. I implemented the immutability method only for sparse=TRUE for now.

examples:

tourism_full <- tsibble::tourism %>%
  aggregate_key((State/Region) * Purpose, Trips = sum(Trips))
fit <- tourism_full %>%
  filter(year(Quarter) <= 2015) %>%
  model(base = fable::ARIMA(Trips))
fit <- reconcile(
  fit,
  ols_td = min_trace(base, method = "ols", 
                    immu = is_aggregated(State) & is_aggregated(Purpose)),
  ols_purpose_mo = min_trace(base, method = "ols", 
                             immu = is_aggregated(State) & !is_aggregated(Purpose)),
  ols_state_mo = min_trace(base, method = "ols", 
                           immu = !is_aggregated(State) & is_aggregated(Purpose) & is_aggregated(Region))
)

@mitchelloharawild
Copy link
Member

Looks great and simple, thanks! I'll use this code and rework it into a more general nicer interface for reconciliation.
Could you add yourself as ctb for this package, and provide a NEWS entry that summarises this change?

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

Successfully merging this pull request may close these issues.

2 participants