当我尝试使用AR(3)模型预测未来数据时,我的预测结果非常糟糕。我不太确定自己哪里出了问题,或者为什么预测结果会开始下降。非常感谢任何帮助或指导。非常感谢。
以下是我的示例:
import pandas as pd
df2 = pd.DataFrame({
"Month" : [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
"Sales Count": [10,15,24,30,33,45,67,70,75,88,92,95,98,105,115]
})
df2.index = df2.Month
df2 = df2.drop('Month',axis=1)
from statsmodels.tsa.arima_model import ARIMA
model = ARIMA(df2['Sales Count'],order=(3,0,0))
model = model.fit()
pred = model.predict(1,27)
这些是我的预测值:
- 1: 10.924977
- 2:19.647766
- 3:31.068473
- 4:35.592394
- 5:36.422376
- 6:52.956438
- 7:81.115237
- 8:74.101817
- 9:77.985398
- 10:95.468273
- 11:95.013056
- 12:96.333352
- 13:99.131086
- 14:108.245458
- 15:120.136458
- 16:122.627635
- 17:122.961509
- 18:121.735104
- 19:119.397032
- 20:116.308360
- 21:112.751786
- 22:108.946149
- 23:105.057805
- 24:101.210451
- 25:97.493384
- 26:93.968447
- 27:90.675809