R 添加带有寓言预测估计的theta模型
我想在我的R 添加带有寓言预测估计的theta模型,r,forecast,fable-r,R,Forecast,Fable R,我想在我的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 %>% mo
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)
有什么方法可以在寓言中使用θ方法吗 来自预测包的模型使用不同的接口,因此与fable使用的
model()
函数不兼容。theta模型将在下一版本中添加到fable中
通过使用forecast::thetaf()
的预测输出来确定适当的分布,您可以自己创建一个寓言。这对于绘图、精度评估和协调非常有用,但是ensembling需要模型使用fable界面
更新:
THETA()
模型现在已添加到fable中
Failure in thetaf(Trips) : Objekt 'Trips' not found