1. Learn
  2. /
  3. Courses
  4. /
  5. ARIMA Models in Python

Exercise

Automated model selection

The pmdarima package is a powerful tool to help you choose the model orders. You can use the information you already have from the identification step to narrow down the model orders which you choose by automation.

Remember, although automation is powerful, it can sometimes make mistakes that you wouldn't. It is hard to guess how the input data could be imperfect and affect the test scores.

In this exercise you will use the pmdarima package to automatically choose model orders for some time series datasets.

Be careful when setting the model parameters, if you set them incorrectly your session may time out.

Three datasets are available in your environment as df1, df2 and df3.

Instructions 1/4

undefined XP
  • 1
    • Import the pmdarima package as pm.
  • 2
    • Model the time series df1 with period 7 days and set first order seasonal differencing and no non-seasonal differencing.
  • 3
    • Create a model to fit df2. Set the non-seasonal differencing to 1, the trend to a constant and set no seasonality.
  • 4
    • Fit a SARIMAX(p,1,q)(P,1,Q)\(_7\) model to the data setting start_p, start_q, max_p, max_q, max_P and max_Q to 1.