3

我正在关注此链接以在我的数据上创建 auto_arima 模型。 https://medium.com/@josemarcialportilla/using-python-and-auto-arima-to-forecast-seasonal-time-series-90877adff03c

Gitub 代码位置是:https ://github.com/Pierian-Data/AutoArima-Time-Series-Blog/blob/master/Forecasting%20a%20Time%20Series%20in%20Python.ipynb

但是,在拟合操作 stepwise_model.fit(train) 期间,我收到以下错误。谁能帮忙,我在 auto_arima 构造函数中找不到并更改 enforce_stationarity 参数

enforce_stationarityValueError:发现设置为 True的非平稳起始自回归参数。

完整错误如下:

stepwise_model.fit(train_amt)#, freq=1)#, enforce_invertibility=False)
Traceback (most recent call last):

  File "<ipython-input-217-1bb05453004a>", line 1, in <module>
    stepwise_model.fit(train_amt)#, freq=1)#, enforce_invertibility=False)

  File "C:\Softwares\ProgramFiles\Continuum\Anaconda3\lib\site-packages\pyramid\arima\arima.py", line 343, in fit
    fit, self.arima_res_ = _fit_wrapper()

  File "C:\Softwares\ProgramFiles\Continuum\Anaconda3\lib\site-packages\pyramid\arima\arima.py", line 337, in _fit_wrapper
    **fit_args)

  File "C:\Softwares\ProgramFiles\Continuum\Anaconda3\lib\site-packages\statsmodels\tsa\statespace\mlemodel.py", line 432, in fit
    start_params = self.start_params

  File "C:\Softwares\ProgramFiles\Continuum\Anaconda3\lib\site-packages\statsmodels\tsa\statespace\sarimax.py", line 999, in start_params
    raise ValueError('Non-stationary starting autoregressive'

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

0 回答 0