Skip to content

Possible to acquire prediciction intervals for reconciled prophet forecasts? #29

@henningsway

Description

@henningsway

Thank you for bringing prophet to fable!

I plan on using prophet in a hierarchical forecasting context, where I require reconciled forecasts. I'm not too familiar with the concepts and methods yet, but I was hoping, that also the reconciled prophet-forecasts would have a distribution (as it seems to be the case for ETS() for example), potentially generated via bootstrapping forecast errors.

Is it possible to get a prediction interval for reconciled prophet forecasts? :)

Please finde a reprex below for the approach I have taken so far.

library(tsibble)
library(fable)
library(fable.prophet)
library(dplyr)


tourism_states <- tourism %>%
  aggregate_key(State / Region, Trips = sum(Trips))

mdl <- tourism_states %>% 
  model(prophet = prophet(Trips)) %>% 
  reconcile(prophet_mint = min_trace(prophet, method = "mint_shrink")) %>% 
  select(-prophet)

fc_rec <- mdl %>% 
  forecast(h = "1 year")

fc_rec %>% 
  filter(is_aggregated(State)) %>% 
  autoplot(tourism_states)

fc_rec_b <- mdl %>% 
  forecast(h = "1 year", bootstrap = TRUE)
#> Error: Problem with `mutate()` input `prophet_mint`.
#> x unbenutztes Argument (bootstrap = TRUE)
#> i Input `prophet_mint` is `(function (object, ...) ...`.

fc_rec_b %>% 
  filter(is_aggregated(State)) %>% 
  autoplot(tourism_states)
#> Error in eval(lhs, parent, parent): Objekt 'fc_rec_b' nicht gefunden

Created on 2020-12-10 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions