【问题标题】:Adding theta model with fable forecasting estimates添加带有寓言预测估计的 theta 模型
【发布时间】:2020-08-22 12:32:53
【问题描述】:

我想在我的 fable 预测模型中使用在 Forecast 包中实现的 theta 模型。这就是我想要做的。

library(forecast)
library(tidyverse)
library(fable)
library(tsibble)
library(fabletools)

tourism_aus <- tourism %>% 
  summarise(Trips = sum(Trips))
tourism_aus


fit <- tourism_aus %>% 
  model(
    ets = ETS(Trips),
    arima = ARIMA(Trips),
    theta = forecast::thetaf(Trips)
  ) %>% 
  mutate(
    average = (ets + arima + theta) / 3
  )
fit

fit %>% 
  forecast(h = "2 years") %>% 
  autoplot(tourism_aus, level = 95, alpha = 0.5)

我收到此错误消息,

Failure in thetaf(Trips) : Objekt 'Trips' not found

有什么方法可以在fable 中使用theta 方法吗?

【问题讨论】:

    标签: r forecast fable-r


    【解决方案1】:

    预测包中的模型使用不同的接口,因此与 fable 使用的model() 函数不兼容。 theta 模型将在下一个版本中添加到 fable 中。

    您可以自己创建寓言,使用forecast::thetaf() 的预测输出来确定合适的分布。这对于绘图、准确性评估和协调很有用,但是集成需要模型使用寓言接口。

    更新: THETA() 模型现已添加到 fable。

    【讨论】: