【问题标题】:Grid search to automatically pick SARIMAX order model in python statsmodels网格搜索以在 python statsmodels 中自动选择 SARIMAX 订单模型
【发布时间】:2017-02-18 16:40:20
【问题描述】:

我目前正在编写一个函数来对 SARIMAX 模型的顺序进行网格搜索:(p,q,d)X(P,Q,D,s)。但是,在拟合时,使用 statsmodels.tsa.SARIMAX() 的默认设置,我经常会遇到以下类型的错误:

ValueError: Non-stationary starting autoregressive parameters found with `enforce_stationarity` set to True.

ValueError: non-invertible starting MA parameters found with `enforce_invertibility` set to True.

我可以停止强制执行平稳性和可逆性以停止出现这些错误,但是,据我所知,我不想要创建不可逆模型的模型参数。

是否可以放宽 enforce_stationarity 和 enforce_invertibility 参数,否则会导致模型不佳?

【问题讨论】:

    标签: python time-series statsmodels


    【解决方案1】:

    这是我在 for-loop 中执行网格搜索的操作:

    for ...:
        try:
            model = smt.SARIMAX(...)
            result = model.fit()
            ...
        except:
            continue
    

    这样,您将跳过非平稳或不可逆模型。

    【讨论】:

      猜你喜欢
      • 2020-11-12
      • 2021-10-12
      • 2017-02-16
      • 2020-06-19
      • 2023-03-09
      • 1970-01-01
      • 2020-11-04
      • 1970-01-01
      • 2017-07-24
      相关资源
      最近更新 更多