tidyverts / tidyverts/fabletools
forecast with reconciliation does not work in time series with only one non-zero observation
Open
@mitchelloharawild is already working on this.
Since Apr 6, 2021.
- Dominant language
- R
- Stars
- 98
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to run an experiment where I have time series that contains only one non-zero observation.
Th experiment runs for the following example where I have two non-zero observations:
library(fpp3)
tibble(
y = c(3,rep(0,198),1),
key = c(rep("A",100),rep("B",100)),
t = c(seq(100),seq(100))
) %>%
as_tsibble(key=key, index=t) %>%
aggregate_key(key, y=sum(y)) %>%
model(ets=ETS(y)) %>%
reconcile(mint = min_trace(ets, method="mint_shrink")) %>%
forecast(h=7)
The following example contains a time series with only one non-zero observation, when I run the experiment I get an error:
library(fpp3)
tibble(
y = c(3,rep(0,198),0),
key = c(rep("A",100),rep("B",100)),
t = c(seq(100),seq(100))
) %>%
as_tsibble(key=key, index=t) %>%
aggregate_key(key, y=sum(y)) %>%
model(ets=ETS(y)) %>%
reconcile(mint = min_trace(ets, method="mint_shrink")) %>%
forecast(h=7)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.