6

Choosing a Forecasting Algorithm

by Bar Amit, Data Scientist, Pyramid Analytics 
and David Novick Technical Writer, Pyramid Analytics


In most management decisions made in today's busy world, executives must take into consideration some type of forecasting. Managers and modelers are forced to cope with seasonality, sudden changes in demand levels, strikes, economy swings, and price-cutting maneuvers by competitors. Predictions of market demands and new trends are no longer a luxury, but a real ongoing necessity.   

The new BI Office Forecasting Wizard assists managers in dealing with these challenges by providing six built-in forecasting algorithms which can be employed instantly by any BI Office user. Many of our customers have asked how they can go about choosing from the six built-in algorithms. Is one algorithm better than another? Or should the user just pick one algorithm at random? This short blog presents one simple method for determining which algorithm is best for a given forecasting task.


The forecasting wizard includes six built-in algorithms, as listed below. Each algorithm has its pros and cons and is best suited to certain types of data.

  • Standard, Trend Only, Seasonal, Simple – performs Holt-Winters based forecasting.

  • Simple Smoothing – performs forecasting based on a moving average.
  • Exponential Smoothing – performs ARIMA forecasting.

We will test how the six built-in algorithms deal with the following data set. The data contains the number of passengers per month that fly on a typical airline.

www.personal.soton.ac.uk/rchc/Teaching/MATH6011/mwhdata/Airline.xls

  1. We upload the data file to BI Office.

  2. We start the forecasting wizard by selecting the Advanced Forecasting command.

    Click the Forecasting icon and then select the Advanced Forecasting command.
     

  3. In the Algorithm panel, we make the following selections:

                       Forecast Type:  Built In: Standard
                       Periods of Data:  Months (as seen in data)
                       Number of Future Periods:  14


Navigate between the wizard dialogs using the items at the left.

In the R Script panel, we select the Customize Script box and edit the R Script as follows:


These two images show the R script content BEFORE and AFTER editing.

The following items have been edited in the R Script:

  • The input was split into two groups: 1-82 is the learning set and 83-96 is the testing set.

  • The test period of 14 months was maintained as is (h=14).

  • The final line was altered in order to calculate the mean as the Mean Absolute Percentage Error (MAPE).

Running this forecast results in one new row in the grid, as shown below. The new row contains the forecasted MAPE.

When we repeat the R Script changes for each of the algorithms, we receive the following results. We see that the best choice is the Standard algorithm since it has the lowest error percentage.

When we run the Standard algorithm on the data set, the forecasted periods are projected as shown below. The forecasted periods are clearly labeled whenever they appear in a grid or a graph.

 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like6 Follow
  • 6 Likes
  • 3 yrs agoLast active
  • 1091Views
  • 4 Following