【问题标题】:Improve python ARIMA prediction改进 python ARIMA 预测
【发布时间】:2023-03-30 08:25:01
【问题描述】:

我是第一次在 python 中研究 ARIMA 模型,但预测并没有任何意义。这些是我的values

使用 auto_ARIMA,我得到了 p、d 和 q 的值 1、1、2。

model = ARIMA(train, order=(1, 1, 2)
fitted = model.fit(disp=0)
print(fitted.summary())

所以我创建了模型并得到了这个摘要。 然后我将它们分成训练集和测试集,这样我就可以验证预测并进行预测:

fc, se, conf = fitted.forecast(len(test), alpha=0.05)  # 95% conf
fc_series = pd.Series(fc, index=test.index)
lower_series = pd.Series(conf[:, 0], index=test.index)
upper_series = pd.Series(conf[:, 1], index=test.index)

然后得到这个plot

我用其他 p、d、q 值进行了测试,但没有得到更好的结果。预测线总是笔直的,从不上下。为什么是这样?我怎样才能改善结果?如果您需要更多信息或情节,请告诉我。

【问题讨论】:

    标签: python statsmodels arima


    【解决方案1】:

    这通常是由于缺乏明显的数据特征,如季节性或趋势。那么 ARIMA 就无法正确处理未来并回退到数据值的平均值。

    我的数据也有类似的问题,我可以通过将其分成更小的块来改进结果。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-02-13
      • 2019-05-06
      • 2021-03-01
      • 2020-04-07
      • 1970-01-01
      • 1970-01-01
      • 2017-05-01
      • 2017-07-28
      相关资源
      最近更新 更多