使用了R.使用预测方法。使用以下代码:
library(forecast)
t1$StartDate <- as.Date(t1$StartDate, origin = "1899-12-30")
## 10,1 indicates 10th Week & Sunday
ordervalu_ts <- ts(t1$Revenue, start = c(10,1), frequency = 7)
print(ordervalu_ts)
ordervalu_ts_decom <- HoltWinters(ordervalu_ts)
print(ordervalu_ts_decom)
ordervalu_ts_for <- forecast:::forecast.HoltWinters(ordervalu_ts_decom, h=30)
print(ordervalu_ts_for)
t1
是输入文件。它有两列:日期和收入。我试图预测未来30天的收入。能够得到输出吗?输出中的日期格式不正确。我有以下问题:
print(ordervalu_ts_for)
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
81.42857 1390.4782 368.3917 2412.565 -172.668266 2953.625
81.57143 1351.3890 328.9055 2373.872 -212.364558 2915.142
81.71429 1355.7625 332.8507 2378.674 -208.646034 2920.171
有人可以帮忙吗?尝试过在youtube和在线观看所有视频。谢谢你的帮助