In a previous blog post, I explained how to perform a predictive what-if simulation using Predictive Planning. The workflow described was not ideal because it required to use the Predictive Planning user interface and creating a predictive model for each simulation scenario. Today, I will describe an improved workflow that makes the predictive what-if simulation simpler: it is centered on the story and requires only one predictive model.
This improvement is made possible thanks to the introduction in wave 2023.25 (QRC 2024.Q1) of two new actions to the predictive step of the multi actions:
If you are interested in an explanation about why you would want to introduce some predictive in your what-if simulation, please refer to the How Does Predictive Relates to What-if Simulation section in this other post.
You are working for a company that rents bikes in London. You have a planning model that contains a BikeHires measure that counts the bike hires done each day. The planning model also contains several measures related to the weather. You know, thanks to Predictive Planning, that the weather has an influence on the number of daily bike hires: people tend to hire more bikes on a warm sunny day than on a rainy or chilly day.
You would like to perform simulations based on different weather hypotheses. In this blog post, you will learn how to setup a story and multi actions to compare different simulation scenarios as illustrated below:
You can download this dataset if you want to recreate this example. Note that the columns BikeHires, Temp. Min, Temp. Max, Temp. Mean, Humid. Min, Humid. Max, Humid. Mean and Rain are expected to be measures in the planning model. Other columns should be considered dimensions. You can refer to this blog post if you need help to create a planning model from a CSV file.
In the rest of the post, we will assume that you are familiar with Predictive Planning and the influencers:
To implement your what-if simulation in SAP Analytics Cloud you will need 3 assets:
The figure below shows these 3 assets in the SAP Analytic Cloud file system:
You would usually create a second multi action allowing to retrain the predictive model, either manually from the story or automatically using a scheduled task in the calendar. For the sake of simplicity we will ignore this step and assume that the predictive model was retrained manually using the user interface of Smart Predict for instance.
The figure below shows the interaction between the assets involved in the simulation workflow:
First, you need a predictive model with influencers. The influencers are the parameters of the predictive simulation. They are the mean that enable you to influence the values predicted by the predictive model.
Create a predictive model and select Humid. Mean, Temp. Mean and Rain as candidate influencers:
Because we want a simulation for 30 days in the future, set the Number of Forecast Periods to 30. The other model parameters are not fundamental in our scenario, for the sake of simplicity you can keep the default value for other parameters.
You can now train the predictive model and check in the Time Series Component Impact chart that Humid. Mean, Temp. Mean and Rain were selected as influencers and can be used to influence the simulation results.
Now, you need a multi action to run the simulations. This multi action will contain an Apply Only action, that allows applying the underlying predictive model, that is, generating new predictions considering the future values of the influencers.
The Apply Only action takes two parameters:
Here are the steps to setup the Multi Action to apply the Predictive Model:
Now you must select an input and an output version for the Apply Only action. To make things more flexible, we will use parameters so it is possible to select the versions in the story just before running a simulation. The multi actions now provide a shortcut that allows creating the parameters efficiently:
Do the same steps again for Save Forecast to Version setting.
The settings of the predictive step should look as shown below:
Finally, you must add to a story one multi action trigger to retrain the predictive model and one to apply the predictive model. For each of the multi actions you have created previously follow these steps:
We are almost ready to run a simulation. But before we must create a version with simulation hypotheses and one to receive the simulation results:
Do that for all the simulation scenarios you want to test.
Now it is time to run a simulation. Click the multi action trigger to run a simulation. Once you have configured the multi action and the multi action trigger as instructed, a dialog opens. In this dialog you must select a version with hypothetical future values for the influencers (the simulation hypotheses) and a version that will receive the predictions.
It is recommended to use distinct planning versions for the hypotheses and the simulation results to avoid unexpected behaviors. At the very least, if you want to use the same version both for input and output be sure to delete any target value in the future before running the simulation (for instance you can add a data action cleaning step in to the multi action).
Click Run and wait for the data in the story to be updated.
In this blog post you have discovered the new Apply Only and Train Only actions provided by the multi action's predictive step. You have learned how to use the Apply Only action to configure a multi action allowing to run predictive what if simulations.
I hope this blog post was helpful to you. If you appreciated reading this, I would be grateful if you left a comment to that effect, and do not forget to like it as well. Thank you.
Do you want to learn more about Predictive Planning? You can read our curated list of Predictive Planning and Smart Predict blog posts or you can read all our other blog posts.
Find all Q&A about SAP Analytics Cloud and feel free to ask your own question here: https://answers.sap.com/tags/67838200100800006884
Visit your community topic page to learn more about SAP Analytics Cloud: https://community.sap.com/topics/cloud-analytics/augmented-analytics
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
15 | |
13 | |
11 | |
11 | |
9 | |
8 | |
7 | |
7 | |
7 |