【问题标题】:SARIMA model orderSARIMA模型订购
【发布时间】:2020-09-08 17:18:50
【问题描述】:

我将 SARIMA 模型 (1,1,1)(2,1,1,96) 用于具有 ACF 和 PACF 图的数据集,如下所示: ACF plot of the dataset PACF plot of the dataset

使用上述模型后,我查看了 ACF 和 PACF 图以确保我已经涵盖了所有依赖项;但是,ACF 和 PACF 图在滞后 96 处显示出很大的值。如果我能得到一些关于我应该对我的 SARIMA 模型订单进行修改的帮助,我将不胜感激。请考虑我的数据具有每日季节性,因为它是 15 分钟数据,所以 S=96。

ACF and PACF plots after fitting the model

谢谢,

【问题讨论】:

    标签: time-series statsmodels arima


    【解决方案1】:

    您可以使用auto_arima function in pmdarima package 对订单组合进行迭代,并根据 AIC 得分获得最佳值。您已经通过 acf 和 pacf 图确定了季节性和非季节性订单。您可以使用这些订单作为起始参数。

    import pmdarima as pm
    from sklearn.metrics import mean_squared_error
    model = pm.auto_arima(<train_data>,error_action="ignore", suppress_warnings = True,
                             seasonal = True,
                             m = 96,
                             start_p = 1,start_q = 1,d=1,
                             start_P = 2,start_Q = 1,D=1,
                             max_p = 12,max_q = 12,max_d=2,
                             max_P = 4,max_Q = 4,max_D = 2,
                             test='adf', #use adf test
                             information_criterion='aic', #AIC or BIC
                             stepwise = False, trace = False)
    

    之后你可以使用plot_diagnostics函数得到模型诊断

    model.plot_diagnostics(figsize=(8,8))
    

    您还可以从汇总函数中获取Ljung-BoxJarque-Bera 统计数据,以检查残差分布和残差相关性。

    model.summary()
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-05
      • 1970-01-01
      • 1970-01-01
      • 2017-08-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多