1

I want to find correct Auto ARIMA values for my dataset. Since my values are presented hourly, I couldn't estimate the parameters. The problem should be about 'm', but greater values crashes eventually. I also tried seasonal false, which resulted with linear forecast. enter image description here

model = pm.auto_arima(df.value, start_p=1, start_q=1,
                      test='adf',       # use adftest to find optimal 'd'
                      max_p=3, max_q=3, # maximum p and q
                      m=1,              # frequency of series
                      d=None,           # let model determine 'd'
                      seasonal=False,   # No Seasonality
                      start_P=0, 
                      D=0, 
                      trace=True,
                      error_action='ignore',  
                      suppress_warnings=True, 
                      stepwise=True)

print(model.summary())
ast
  • 35
  • 1
  • 7

1 Answers1

1

Your data is clearly seasonal, so you should set the parameter seasonal = True.

m is the length of a seasonal period, meaning the number of data points in each period. You have multiple seasonalities in your data (daily, weekly and probably yearly), but I think you should focus on the daily seasonality. Since you have hourly data, each season has 24 data points. Therefore, you should set m = 24. While ARIMA may struggle with long seasonalities, I think that 24 should be fine.

I would not restrict or lock ARIMA to specific values/ranges for each parameter. Try the following:

model = pm.auto_arima(df.value, 
                      test='adf',
                      seasonal=True,
                      m=24,
                      trace=True,
                      error_action='ignore',  
                      suppress_warnings=True, 
                      stepwise=True)
Arne Decker
  • 808
  • 1
  • 3
  • 9
  • Thanks for the reply, here is the result; Best model: ARIMA(3,0,1)(1,0,1)[24] https://imgur.com/a/KN7z2cT – ast Apr 06 '22 at 13:51
  • You should keep in mind that you cannot forecast too far into the future. Your model uses 1 lag for the MA components, so you can forecast only one step into the future at a time. If you want to forecast longer horizons, you need to update your model. – Arne Decker Apr 06 '22 at 21:00
  • This is the up-to-date one. Any suggest to update my model? `n_periods = 480 fitted, confint = smodel.predict(n_periods=n_periods, return_conf_int=True) index_of_fc = pd.date_range(df.index[-1], periods = n_periods, freq='H')` (https://imgur.com/a/yNEZ2wl) – ast Apr 06 '22 at 22:58
  • Hi. I am not sure how you infer 24 for 1 day seasonality. I would say double check the [official docs](https://alkaline-ml.com/pmdarima/tips_and_tricks.html#period) – Talha Anwar Oct 08 '22 at 16:55