auto_arima(... , seasonal=False) but got SARIMAX 😐
Asked Answered
C

1

1

I want to know the orders (p,d,q) for ARIMA model, so I've got to use pmdarima python package. but it recommends me SARIMAX model! keep reading for more details.
i used Daily Total Female Births Data for this purpose. it's a stationary time series.

# importing packages
import pandas as pd
from pmdarima import auto_arima
import warnings
warnings.filterwarnings('ignore')

# read csv file
df = pd.read_csv('/Data/DailyTotalFemaleBirths.csv' , index_col=0 , parse_dates=True)

# set daily frequency for datetime indexes
df.index.freq = 'D'

# now using auto_arima i try to find (p,d,q) orders for ARIMA model.
# so i set seasonal=False because i don't want orders for SARIMA! my
# goal is to find orders for ARIMA model not SARIMA
auto_arima(df['Births'] , start_P= 0 , start_q=0 , max_p=6 , 
            max_q=3 , d=None , error_action='ignore' , suppress_warnings=True ,
            m=12 , seasonal=False , stepwise=True).summary()

then it gives me this:
enter image description here

the problem is where although I set seasonal=False but it gives me SARIMAX (which stands for Seasonal Autoregressive Independent Moving Average) but I don't want to consider seasonal component, so I set seasonal=False! seems that pmdarima doesn't pay attention to seasonal=False!

can someone help me to figure out what is the problem?


Expected result:
enter image description here

for False Result: SARIMAX result comes from pmdarima version 1.8.3
for True Result: ARIMA result comes from pmdarima version 1.1.0

Cotidal answered 11/10, 2021 at 15:9 Comment(4)
Looks like this changed in version v1.5.1. pmdarima always uses SARIMAX now.Szabadka
@NickODell are you sure? so you mean it's not a problem? additional details: in pmdarima version 1.8.3, and exactly in this example; when I run auto_arima(...).seasonal_order it gives me (0,0,0,0) which can be interpreted as ignoring seasonal component I guess. what do you think about this?Cotidal
I agree - that's the default value for the seasonal_order component, and per the documentation, the default seasonal order has no effect: Default is no seasonal effect. github.com/statsmodels/statsmodels/blob/…Szabadka
@NickODell Thanks! I saw your mentioned references. so there's no problem there. Thank you for your help! it would be great if you Answer This Question then I'll verify it.Cotidal
S
3

It's not really using a seasonal model. It's just a confusing message.

In the pmdarima library, in version v1.5.1 they changed the statistical model in use from ARIMA to a more flexible and less buggy model called SARIMAX. (It stands for Seasonal Autoregressive Integrated Moving Average Exogenous.)

Despite the name, you can use it in a non-seasonal way by setting the seasonal terms to zero.

You can double-check whether the model is seasonal or not by using the following code:

model = auto_arima(...)
print(model.seasonal_order)

If it shows as (0, 0, 0, 0), then no seasonality adjustment will be done.

Szabadka answered 11/10, 2021 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.