我有一个包含季节性成分的时间序列。我安装了 statsmodels ARIMA
model = tsa.arima_model.ARIMA(data, (8,1,0)).fit()
例如。现在,我了解到 ARIMA 与我的数据存在差异。我如何比较结果
prediction = model.predict()
fig, ax = plt.subplots()
data.plot()
prediction.plot()
因为数据将是原始数据和预测是有区别的,所以均值在 0 附近,与数据的均值不同吗?
As the 文档 http://statsmodels.sourceforge.net/0.6.0/generated/statsmodels.tsa.arima_model.ARIMA.predict.html#statsmodels.tsa.arima_model.ARIMA.predict显示,如果关键字typ
被传递到predict
方法,答案可以在原始预测变量中显示:
typ : str {‘linear’, ‘levels’}
‘linear’ : Linear prediction in terms of the differenced endogenous variables.
‘levels’ : Predict the levels of the original endogenous variables.
所以电话是
model = tsa.arima_model.ARIMA(data, (12,1,0)).fit()
arima_predict = model.predict('2015-01-01','2016-01-01', typ='levels')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)