用不同statsmodels版本拟合ARIMA模型

2024-06-09 08:31:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我最近在我的一台计算机上从Statsmodels 0.6.1更新到了0.8(因此我现在有一台使用Statsmodels 0.6.1的计算机和一台使用Statsmodels 0.8的计算机。在这两种情况下,我都使用python 2)。我试图在两台计算机上使用相同的精确模型,但这并没有发生。这两种情况下的数据集是相同的:原木价格的差异。 这是我的系列(S01)

|index   |      V    |
|--------|-----------|
|2012-01 |   0.297353|
|2012-02 |   0.191067|
|2012-03 |   0.278704|
|2012-04 |   0.143121|
|   ...  |    ...    |
|2020-06 |  -0.700000|
|2020-07 |  -0.700000|
|2020-08 |  -0.622454|
|2020-09 |  -0.700000|
Freq: M, Name: V, Length: 105, dtype: float64

我的问题是,如果我运行此模型:

import statsmodels.api as Statsm 
STM = Statsm.tsa.ARIMA(S01, (1,0,1), freq = "M")  
FIT = STM.fit(disp = -1,trend ='c', method='css-mle')

使用Statsmodels 0.6.1时,会出现以下错误:

LinAlgError: SVD did not converge

当我使用Statsmodels 0.8使用相同的精确数据运行相同的精确事物时,它会收敛。这怎么可能

谢谢


Tags: 数据name模型index计算机情况价格差异