R的当量是多少arima中的auto.forecastPython

2024-06-01 02:35:24 发布

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

我想用自动阿里玛但是在Python中。我该怎么做

我要求一个特殊的功能自动阿里玛这基本上通过运行多个ARIMA模型来实现预测过程的自动化。因此,这并不是一个真正的图书馆推荐-相反,它更多的是一个可以被现有的statsmodel解决的问题(之前的问题在两年内没有任何改进),所以冒着-我问这个问题的风险

参考https://www.otexts.org/fpp/8/7

早先的一个问题在auto.arima() equivalent for python上问过这个问题

在自动阿里玛()R中的函数采用Hyndman和Khandakar算法的变异,结合单位根检验、最小AICc和MLE得到ARIMA模型。算法遵循以下步骤。 自动ARIMA建模的Hyndman-Khandakar算法

The number of differences dd is determined using repeated KPSS tests.

The values of pp and qq are then chosen by minimizing the AICc after differencing the data dd times. Rather than considering every possible combination of pp and qq, the algorithm uses a stepwise search to traverse the model space.

(a) The best model (with smallest AICc) is selected from the following four:

ARIMA(2,d,2),
ARIMA(0,d,0),
ARIMA(1,d,0),
ARIMA(0,d,1).

If d=0d=0 then the constant cc is included; if d≥1d≥1 then the constant cc is set to zero. This is called the "current model".

(b) Variations on the current model are considered:
    vary pp and/or qq from the current model by ±1±1;
    include/exclude cc from the current model.

The best model considered so far (either the current model, or one of these variations) becomes the new current model.

(c) Repeat Step 2(b) until no lower AICc can be found.

可能的解决方案

^{pr2}$

Tags: andofthefrom算法modeliscurrent