pythontime-seriesforecastingstatsforecast

Is there a way to get p,d,q,P,D,Q params from statsforecast AutoARIMA


minimal example:


from statsforecast import StatsForecast
from statsforecast.models import AutoARIMA
import pandas as pd

df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/air-passengers.csv')


sf = StatsForecast(
    models = [AutoARIMA(season_length = 12)],
    freq = 'M',
    n_jobs=-1,
    verbose=True
)

sf.fit(df)

How to get the parameters of the fitted model ?

I know this is possible using pmdarima package, but pmdarima is way too slow and runs out of memory on large data. statsforecast seems promising, but only if there is a way to get the params


Solution

  • From this answer, the solution would be:

    sf.fitted_[0][0].model_['arma']
    

    which will output a tuple of 7 values. I don't know the exact mapping of parameters to tuple values, but from this line it appears to be:

    (p, d, q, P, D, Q, constant)