ARIMA algorithm in ATT forecast engine

When the forecast engine is called using Auto Regressive Integrated Moving Average (ARIMA) algorithm, a call is made to the SCP Artificial Intelligence (AI) service, in which, a third-party python method is used to calculate the model using the ARIMA technique.
Note: The SCP AI service and ARIMA algorithm are available only in Multi-Tenant (MT) cloud deployments of SCP.

The AI service is developed as a REST service that provides endpoints to allow the calling of various Machine Learning or AI packages implemented in Python. Python is widely used in the Machine Learning forecasting community and frameworks such as Tensorflow, Keras, and Pmdarima.

Representational state transfer (REST) is an existing standard for a software architecture for interactive applications that use multiple Web services. A REST API (RESTful API) is an application programming interface (API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services.

Currently, single item forecasting calls are supported in the AI service, in which the forecast input data for a single item is passed to the server and the engine result is returned.

Functionality

The function of ARIMA algorithm:

  • The python ARIMA technique (auto_arima) implements the Seasonal ARIMA (SARIMA) method. The non-seasonal ARIMA models are denoted as ARIMA(p,d,q) where p, d, and q parameters are non-negative integers such as:
    • p: the order (number of time lags) of the autoregressive model
    • d: the degree of differencing, which means the number of times the data have had subtracted the past values.
    • q: the order of the moving-average model
  • The Seasonal ARIMA models are usually denoted as ARIMA(p,d,q)(P,D,Q)m, where m refers to the number of periods in each season, and the P,D,Q refers to the autoregressive, differencing, and moving average terms for the seasonal part of the ARIMA model.
  • The auto_arima method uses various tests to determine the level of differencing required and subsequently fits multiple ARIMA models with different values for p, q, P and Q, the auto-regressive and moving average parameters for the non-seasonal and seasonal elements of the model respectively.
    Note: The model with the lowest Information Criterion is selected and returned.

The history of each item and location must be retrieved and passed to the AI service as follows:

  1. Normalize the history as per other algorithms.
  2. Perform the standard short history check and SMP check, as per other algorithms.

The auto_arima method can fail based on a specified data set. You can consider this process as an example:

  1. Call auto_arima with seasonal = True (irrespective of the Model Form parameter).
  2. If the call passes, exit and return from the engine with the selected model.
  3. If the call fails, recall auto_arima with seasonal = False:
    1. If this call passes, exit and return from the engine with the selected model.
    2. If this call fails, return to the main forecast engine with the python exception:
      1. Return from the forecasting engine to SCP with the python exception and without a model.

Result

These are the results of forecast engine call with ARIMA algorithm:

  • The forecast is returned and processed as per other algorithms.
  • An automated ARIMA model fits seasonal and non-seasonal models and picks the “best” using the information criteria (cAIC). If the fit fails with an exception, the automated ARIMA model is refitted without a seasonal model. A check is performed based on certain criteria of the returned model to decide whether the resultant model form is Seasonal, Linear, or Constant.
  • Degrees of Freedom, returned for other algorithms, is not populated by the implemented ARIMA technique. For more details on Forecast Engine output values and forecasting parameters applicable to ARIMA. See, the CallForecastEngine parameters help topic.
  • When the forecast engine is called using ARIMA algorithm and the SCP AI service is not configured or available, a warning message is logged in the Audit Log listing each item and location combinations that are not processed.
Note: The previous forecast information related to Item and location combinations, mapped to output measure in the forecast engine configuration, are cleared as part of the engine pre-processing.