该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
model=ARIMA(xdata,(p,1,q)).fit()
print(u'predition:',model.forecast(5))
输出结果:
(array([ 87375195.39200352, 87294371.90756984, 87334812.48326722,
87424680.24570116, 87534694.51144411]),
array([ 1062798.88935205, 1148529.23429549, 1162499.18483996,
1164944.86673523, 1165411.07431117]),
array([[ 85292147.84606433, 89458242.93794271],
[ 85043295.97315933, 89545447.84198035],
[ 85056355.94892374, 89613269.0176107 ],
[ 85141430.2629253 , 89707930.22847703],
[ 85250530.77861008, 89818858.24427813]]))
predict_fig1 = model.predict('2014-11-11','2014-11-16',dynamic=True)
print(predict_fig1)
2014-11-11 -658782.778083
2014-11-12 -195135.421861
2014-11-13 -6152.928357
2014-11-14 70876.267154
2014-11-15 102273.339185
2014-11-16 115070.774308
Freq: D, dtype: float64
这两个方法都是做预测,但输出结果不同,到底有什么区别?
官网解释如下,仍不明白,求解释~
http://statsmodels.sourceforge.net/stable/generated/statsmodels.tsa.arima_model.ARIMAResults.predict.html#statsmodels.tsa.arima_model.ARIMAResults.predict