我想在我的Forecast预测模型中使用在fable包中实现的θ模型。这就是我想要做的。
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中使用θ方法?
发布于 2020-05-08 07:12:22
来自预测包的模型使用不同的接口,因此与寓言使用的model()函数不兼容。theta模型将在下一个版本中添加到寓言中。
通过使用forecast::thetaf()的预测输出来确定适当的发行版,您可以自己创建一个寓言。这可能是有用的绘图,准确性评估和协调,但装配需要模型使用寓言界面。
更新:THETA()模型现在已经添加到寓言中了。
https://stackoverflow.com/questions/61653954
复制相似问题