Parameters start_p and start_q in pmdarima.auto_arima do not work after they are set

28 Views Asked by At

I'm trying to use the auto_arima method in the pmdarima package to automatically find the optimal d, p, q of the ARIMA model. I hope that p and q start from 1 instead of 0, and the maximum is 3. You can see that even if start_p=1 and start_q=1 are set, the returned information shows that the minimum value of p and q is 0, not 1.

import pandas as pd
import numpy as np
import pmdarima as pm
from statsmodels.tsa.arima.model import ARIMA

# Generate date sequence
dates = pd.date_range(start='2021-01-31', periods=16, freq='M')
# Generate random data
data = np.random.rand(16)
# Create DataFrame
df = pd.DataFrame(data, index=dates, columns=['Value'])
pm.auto_arima(df['Value'], start_p=1, start_q=1, test='adf', max_p=3, max_q=3,
               seasonal=False, d=1, max_d=3, trace=True, error_action='ignore',
               suppress_warnings=True, stepwise=False)

Out:

ARIMA(0,1,0)(0,0,0)[0] intercept   : AIC=18.978, Time=0.01 sec
 ARIMA(0,1,1)(0,0,0)[0] intercept   : AIC=inf, Time=0.02 sec
 ARIMA(0,1,2)(0,0,0)[0] intercept   : AIC=inf, Time=0.02 sec
 ARIMA(0,1,3)(0,0,0)[0] intercept   : AIC=inf, Time=0.02 sec
 ARIMA(1,1,0)(0,0,0)[0] intercept   : AIC=17.548, Time=0.01 sec
 ARIMA(1,1,1)(0,0,0)[0] intercept   : AIC=inf, Time=0.02 sec
 ARIMA(1,1,2)(0,0,0)[0] intercept   : AIC=inf, Time=0.03 sec
 ARIMA(1,1,3)(0,0,0)[0] intercept   : AIC=inf, Time=0.04 sec
 ARIMA(2,1,0)(0,0,0)[0] intercept   : AIC=18.669, Time=0.01 sec
 ARIMA(2,1,1)(0,0,0)[0] intercept   : AIC=inf, Time=0.04 sec
 ARIMA(2,1,2)(0,0,0)[0] intercept   : AIC=inf, Time=0.03 sec
 ARIMA(2,1,3)(0,0,0)[0] intercept   : AIC=inf, Time=0.04 sec
 ARIMA(3,1,0)(0,0,0)[0] intercept   : AIC=20.073, Time=0.01 sec
 ARIMA(3,1,1)(0,0,0)[0] intercept   : AIC=inf, Time=0.03 sec
 ARIMA(3,1,2)(0,0,0)[0] intercept   : AIC=inf, Time=0.04 sec

Best model:  ARIMA(1,1,0)(0,0,0)[0] intercept
Total fit time: 0.362 seconds
Out[13]: ARIMA(order=(1, 1, 0), scoring_args={}, suppress_warnings=True)

Are start_p or start_q parameters not taking effect in pmd's auto.arima?

Related references:

https://github.com/alkaline-ml/pmdarima/issues/386

0

There are 0 best solutions below