【发布时间】:2019-08-29 17:03:21
【问题描述】:
我有以下data 并尝试运行arima_standard and arima_fourier。我正在回测,所以我运行了几个日期的预测。在这种情况下,我从 2018 年 9 月开始运行它,因此训练数据介于 2016-01-29 和 2017-09-30 之间,测试数据介于 2017-10-01 和 2018-09-30 之间。
how_many_weeks_test <- 52
how_many_days_test <- 365
temp_fcst_train_data <- head(temp_fcast_data, -1 * how_many_days_test)
temp_fcst_test_data <- tail(temp_fcast_data, how_many_days_test)
列j 是数据文件中的一个变量var,我正在预测多个变量,但只有这个有这些问题,因此我只为这个提供了数据。
temp_xreg_cols <- c(names(temp_fcst_train_data[, grepl("special_events",names(temp_fcst_train_data))]), paste("day_fluct_", j, sep = ''))
temp_xreg_cols2 <- names(temp_fcst_train_data[, grepl("month",names(temp_fcst_train_data)) | grepl("wday",names(temp_fcst_train_data)) | grepl("special_events",names(temp_fcst_train_data))])
temp_model1 <- arima_fourier_train(train = temp_fcst_train_data, test = temp_fcst_test_data, column = j, freq = 364)
temp_model2 <- arima_standard_train(train = temp_fcst_train_data, test = temp_fcst_test_data, column = j , freq = 364, xreg_cols = temp_xreg_cols)
temp_model3 <- arima_standard_train(train = temp_fcst_train_data, test = temp_fcst_test_data, column = j , freq = 364, xreg_cols = temp_xreg_cols2)
运行arima_fourier_train 或arima_standard_train 时,这是我得到的错误。
Residual standard error: 948600000 on 586 degrees of freedom
Multiple R-squared: 0.4815, Adjusted R-squared: 0.4602
F-statistic: 22.67 on 24 and 586 DF, p-value: < 2.2e-16
Fitting models using approximations to speed things up...
ARIMA(2,1,2) with drift : Inf
ARIMA(0,1,0) with drift : Inf
ARIMA(1,1,0) with drift : Inf
ARIMA(0,1,1) with drift : Inf
ARIMA(0,1,0) : Inf
ARIMA(1,1,2) with drift : Inf
ARIMA(2,1,1) with drift : Inf
ARIMA(3,1,2) with drift : Inf
ARIMA(2,1,3) with drift : Inf
ARIMA(1,1,1) with drift : Inf
ARIMA(1,1,3) with drift : Inf
ARIMA(3,1,1) with drift : Inf
ARIMA(3,1,3) with drift : Inf
ARIMA(2,1,2) : Inf
Error in auto.arima(y, xreg = xreg, seasonal = FALSE, max.d = 5, num.cores = 6, :
No suitable ARIMA model found
[1] "this model will be ignored"
有没有办法改进超参数以获得预测或问题是别的什么?我是强制转换的新手,很难理解为什么会出现错误。
如果我正在运行 SARIMA(即季节性参数设置为 TRUE),这是我得到的错误:
Error in auto.arima(y, xreg = xreg, seasonal = TRUE, max.d = 5, num.cores = 6, :
No suitable ARIMA model found
In addition: Warning message:
The chosen seasonal unit root test encountered an error when testing for the first difference.
From stl(): series is not periodic or has less than two periods
0 seasonal differences will be used. Consider using a different unit root test.
[1] "this model will be ignored"
你的想法是什么?我也在使用 NN 和 TBATS,但误差在 30% 到 40% 之间,我希望误差低于 20%,或者理想情况下低于 15%。
欢迎任何帮助或建议!
谢谢!
【问题讨论】:
-
您是如何将数据拆分为训练和测试的?
-
请在
column = j中定义j的值 -
添加有问题的这些细节。