How can you measure the quality of forecasted values with the Time Series algorithm when you do not have the actual data yet? Waiting until the data is available is likely not practical because by that time, you might already have made wrong decisions based on your forecasting model. There is a better way to measure the performance of the Time Series model. Using a specific number of periods from the past, you can try to forecast present values. If the model performs well for forecasting present values, probability is good that it will perform well for forecasting future values.
You control the creation of historical models by using two algorithm parameters: HISTORICAL_MODEL_COUNT and HISTORICAL_MODEL_GAP. The first one controls the number of historical models that will be built, and the second one controls the number of time slices between historical models. Figure 1 uses SSAS 2005 to show historical forecasts (the dotted lines before the current point in time) for the R-250 model for sales amount in Europe. What you can see is that the forecasts are very unstable and, thus, not very reliable. You can also see that the forecasts (the dotted) become even negative, and this is true for both, historical and future forecasts.
The reason for this instability is that SSAS 2005 Time Series use a single algorithm, Auto-Regression Trees with Cross-Prediction (ARTXP); this algorithm provides good short-term forecasts only. SSAS notes this instability in long-term forecasts and simply stops forecasting.
In SSAS 2012 (and 2008 and 2008 R2), you can use a blend of two different Time Series algorithms for forecasting. Besides ARTXP, SSAS 2012 provides the Auto-Regressive Integrated Moving Average (ARIMA) algorithm, which is much better for long-term forecasts. After you upgrade your Time Series models to SSAS 2012, you should refine the blend of ARTXP and ARIMA in your models by changing the FORECAST_METHOD and PREDICTION_SMOOTHING algorithm parameters. The first parameter uses an automatic method to determine the mixture of the algorithms, and the second one (available only in Enterprise Edition) lets you define the blend manually.
As you can see in Figure 2, the upgraded version of the Time Series algorithm uses a MIXED forecast method (default). Therefore, ARTXP is used for short-term forecasts and ARIMA for long-term forecasts.
Note that even if you use ARTXP as forecast method only, you can still use the MAXIMUM_SERIES_VALUE and MINIMUM_SERIES_VALUE parameters to limit the range of the forecasted values.
Figure 3 shows the results – forecast for the R-250 model for sales amount in Europe. As you can see, forecasts quickly stabilize and even long-term forecasts never achieve impossible values, like values lower than zero. Although, from the figure 3, it seems that historical forecasts are unstable as well. This is because we used only forecasts for two points in the past (the HISTORICAL_MODEL_GAP parameter), and thus only ARTXP method was used.
In short: if you see impossible numbers forecasted for historical or future forecasts, you are probably using SSAS 2005, or SSAS higher edition, but ARTXP algorithm only. To learn more about Time Series algorithm parameters, see the SQL Server 2012 BOL topic “Microsoft Time Series Algorithm” (http://msdn.microsoft.com/en-us/library/ms174923(SQL.110).aspx).
- Python for SQL Server Specialists Part 4: Python and SQL Server - April 24, 2018
- Python for SQL Server Specialists Part 3: Graphs and Machine Learning - April 11, 2018
- Python for SQL Server Specialists Part 2: Working with Data - March 22, 2018