Skip to main content
 首页 » 编程设计

python之统计模型 : AttributeError: 'module' object has no attribute 'x13'

2025年05月04日15dflying

我正在用 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'

我不知道如何修复它。

请您参考如下方法:

我不熟悉 statsmodels,但试试这个:

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