tidyverts / fabletools

General fable features useful for extension packages
http://fabletools.tidyverts.org/
89 stars 31 forks source link

Forecast lines now missing with fabletools and tidyverse #357

Closed ollings closed 4 months ago

ollings commented 2 years ago

Using fabletools and tidyverse, I'm trying to plot the results from a stR time series decomposition with autoplot from a dable (dcmp_ts) looking like this:

Date Calls Trend Yearly Weekly Remainder
< date > < dbl > <3: distribution> < dbl >

E.g., autoplot(calls_dbl, scale_bars = FALSE, size = 0.5, level=95). For Trend, Yearly and Weekly this used to produce forecast lines with confidence intervals, but after doing some updates I now only get the confidence intervals. Is this a bug or has something changed?

robjhyndman commented 2 years ago

Please provide a reproducible example

mitchelloharawild commented 2 years ago

autoplot(<dable>) does not currently plot distributions, and so it only works with point predictions.

ollings commented 1 year ago

Any plans to reintroduce this feature? E.g., currently it is not possible to correctly reproduce the electricity demand example in Dokumentov & Hyndman (2021), which is unfortunate. I guess it is possible to go back to older versions of the necessary packages, but I would rather not have to try that...

elec

mitchelloharawild commented 1 year ago

Please provide a reproducible example using the {reprex} package. As far as I'm aware, previous versions of this package didn't support plotting distributions in a decomposition plot.

ollings commented 1 year ago

I'm new to the reprex way so it seems I will need a bit of time to sort that out. In the meantime, the attached pdf is Fig. 4 from Dokumentov & Hyndman (2021). I used to get a similar-looking result with the code and data provided. I believe this is a state-of-the-art decomposition method, so it's unfortunate that the code has stopped working correctly, at least for the not-so-apt...

vic-1.pdf

robjhyndman commented 1 year ago

The code for the paper is here: https://github.com/robjhyndman/STR_paper/blob/main/str_ijds.Rmd