alkaline-ml / pmdarima

A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.
https://www.alkaline-ml.com/pmdarima
MIT License
1.57k stars 231 forks source link

Unable to count seasonality #518

Open tiwari93 opened 1 year ago

tiwari93 commented 1 year ago

Describe the question you have

While running auto arima i made seasonal parameter as true. Still while fitting and testing model is not testing for seasonality. I tested with various samples having seasonality I found same issue.

image image

Versions (if necessary)

No response

tgsmith61591 commented 1 year ago

That's not how auto_arima works. When you provide seasonal=True and m=12 (in your case) it tells auto_arima to perform a seasonal differencing test for D:

    if m == 1:
        D = max_P = max_Q = 0
    # m must be > 1 for nsdiffs
    elif D is None:  # we don't have a D yet and we need one (seasonal)
        D = nsdiffs(xx, m=m, test=seasonal_test, max_D=max_D,
                    **seasonal_test_args)

In your case, D was found to be 0, meaning no seasonal differencing required. Both d and D are only solved for once, and are not included in the stepwise search