Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

The release of SAP BusinessObjects Predictive Analytics 3.0 opens the door to powerful time series forecasting scenarios!

Our straightforward wizard-based approach makes it possible to create and save time series predictive models via a few clicks.

Since 3.0 was released, it’s possible to derive many predictive models from this very first model, based for instance on different geographies or product lines. 

The periodic retraining of this segmented model on fresher data can be scheduled. All the resulting forecasts can be written to an output table, and generate added-value data.

These capabilities are available in a nice and intuitive SAP Fiori-based user interface, the SAP Predictive Factory.

In the following step-by-step example, let’s imagine a retailer running brick & mortar stores. This company wants to forecast the number of customer visits in each of their stores so that they can make sure that the stores are staffed adequately and that the customer demand can be fulfilled.

Everything starts with the creation of a time series analysis model.

The source data used is stored in a SAP HANA table. The table contains the historical data of the store visits, per store, from July 2010 to June 2016. The data is aggregated at a monthly level.

The order of the data is based on the DATE variable. A filter is set on of one the stores to create the initial model.

The model will be created on the data of the first store (nicknamed Store_1).

The Target variable is named VISITS, it is the aggregated number of customer visits per month.

The forecast is required for the next year to come - this is specified as 12 forecasts, one per month that needs to be predicted.

When debriefing the model, the following can be noticed: 

- the number of customer visits contains a general trend and cycles, which have been described by the time series model

- the horizon-wide MAPE (Mean Absolute Percentage Error) is equal to 0,033. The error is only 3.3% which means that the time series model describes the signal accurately.

When comparing the signal (the real customer visits) and the forecast, the accuracy of the model can be noticed.

The time series model can be saved locally. It can also be saved in the SAP HANA database that contains the data.

In SAP Predictive Factory, a project dedicated to customer visit forecasting has been created.

The model that was saved earlier on is imported in the project.

The initial time series model can be segmented. It means that a separate time series model is going be created for each store. This segmentation capability is available only for time series models in the 3.0 release.

The model is segmented depending on the variable STORE, it is part of the SAP HANA table.

The reference date for the training is set to June 2016, it means that all the data up to the last data point measured in June will be used to train the segmented model. 

The segmented model is created. Please note that the creation of the model is delegated to SAP HANA, thanks to SAP HANA’s Automated Predictive Library. It means that the data is not being moved out of SAP HANA in the model training process.

20 different models have been trained for each store. The performance of each model is displayed. The segmented model is set as the active one.

Tasks make it possible to automatically refresh the segmented model and make sure up-to-date forecasts can be delivered.

A task is defined to:

  • Be run every month, as the source table will be enriched with new records month after month.
  • Use the 5 last years of historical data (before the reference date) to train the segmented model
  • Forecast the next 12 months after the reference date.

The forecasting task is scheduled to be executed on a monthly basis and deliver predictions for the next 12 months after the reference date.

The data corresponding to the next 12 months forecast can be written back in the SAP HANA database.

For the purpose of the example, let’s run the task based on today's date and forecast the customer visits for next year.

Once the task has been run, the performance over the different segments is displayed. The top segment is Store_15 with 2.17% of error, while the segment with the least good performance is Store_9.

The forecast can be compared to the historical data, for any of the stores, like shown below.

As a conclusion to this step-to-step example, the SAP Predictive Factory represents a very powerful addition to the SAP BusinessObjects Predictive Analytics product family as it makes possible to create mass forecasting models, for instance for different geographies or product lines.

Similarly to this retail example, many applications can be imagined for manufacturing, telecommunications companies and in general every industry that requires visibility on the future!

We look forward to hearing from you on the business cases made possible with the SAP Predictive Factory!