Forecasting sales

Finally, after completing the preceding time series data analysis and decomposition, we can get to the actual forecasting step! Still in-step with the track outlined in the selected example, the data scientist chose to apply one of the most commonly used methods for time series forecasting, autoregressive integrated moving average (ARIMA).

You can head on to the following link to learn more about ARIMA: http://www.forecastingsolutions.com/arima.html.

To use an ARIMA model or methodology for a time series forecasting exercise, you'll need to understand how to choose values for the algorithms' three main parameters: as P, D, and Q. Assuming you've validated your model choice (to use ARIMA in the first place), the hardest part of building the actual forecasting model and generating a forecast with the model is selecting those parameter values that best fit the model (given the data):

  • P is the number of autoregressive terms
  • D is the number of nonseasonal differences needed for stationarity
  • Q is the number of lagged forecast errors in the prediction equation

Without digging too deep into the theories behind parameter selection, we'll say here that this step involves determining the possible parameter value combinations, looking at their overall fitting results, running the appropriate diagnostics to investigate any unusual behaviors by the model, and validating results generated by the model.

The following are the code blocks and selected outputs as implemented with IBM Watson Studio:

Let's take a look at the first code here that shows the examples of the parameter combinations:

Let's take a look at the next code here:

Now, take a look at the following screenshot:

Now, let's take a look at all the graphs here at once:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset