tidyverts / tidyverts/fabletools

Reconciliation raises an unexpected error

Open
#358 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
98
Forks
37
PR merge metrics
No merged PRs in 30d

Description

First, this has nothing to do with the hts package. You are using the forecast reconcilation procedures in the fabletools package.

Second, your example consists of a single time series (the ACT), so the reconciliation is degenerate.

Third, SNAIVE is already reconciled since the forecasts are equal to the last year of data, so the reconciliation is degenerate.

That said, we should improve fabletools to prevent the error. @mitchelloharawild

To see it working on a small non-degenerate example, try this:

library(dplyr  , quietly = TRUE)
library(tsibble, quietly = TRUE)
library(fable  , quietly = TRUE)

tsibble::tourism %>%
  filter(State == 'ACT') %>% 
  aggregate_key(State / Region, Trips = sum(Trips)) %>% 
  model(base = fable::SNAIVE(Trips)) %>%
  reconcile(mint_cov = min_trace(base, method = "mint_cov")) %>% 
  forecast(h = 1)

From https://github.com/earowang/hts/issues/43#issuecomment-1139303691

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reconciliation example in the issue with R, fable, tsibble, and fabletools, then inspect the reconciliation and forecasting path that produces the unexpected error. Done means the non-degenerate example runs without that error and a regression check covers the case; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.