Statsmodels : AttributeError: 'module' object has no attribute 'x13'

Statsmodels : AttributeError: 'module' object has no attribute 'x13'

我正在对 Python 中的时间序列实施季节性 ARIMA 预测。我正在使用 Statsmodels 0.7.0。

到目前为止我所做的是:

import statsmodels.api  as sm
res= sm.tsa.x13.x13_arima_select_order(time_series)

但是我收到这个错误:

AttributeError: 'module' object has no attribute 'x13'

我不知道如何修复它。

我不熟悉统计模型,但试试这个:

from statsmodels.tsa.x13 import x13_arima_select_order

res = x13_arima_select_order(time_series)

来源:https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/tests/test_x13.py