Skip to content

Instantly share code, notes, and snippets.

@dpbac
Created June 23, 2021 12:51
Show Gist options
  • Select an option

  • Save dpbac/87dd8d27397a976ec7cbbc0159ff20c6 to your computer and use it in GitHub Desktop.

Select an option

Save dpbac/87dd8d27397a976ec7cbbc0159ff20c6 to your computer and use it in GitHub Desktop.
import pmdarima as pm
# Create auto_arima model
model1 = pm.auto_arima(df_store_2_item_28_time, #time series
seasonal=True, # is the time series seasonal
m=7, # the seasonal period - one week?
d=1, # non-seasonal difference order
D=1, # seasonal difference order
max_p=6, # max value of p to test
max_q=6, # max value of p to test
max_P=6, # max value of P to test
max_Q=6, # max value of Q to test
information_criterion='aic', # used to select best mode
trace=True, # prints the information_criterion for each model it fits
error_action='ignore', # ignore orders that don't work
stepwise=True, # apply an intelligent order search
suppress_warnings=True)
# Print model summary
print(model1.summary())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment