SAP Predictive Analytics 3.2 – Classification Scenario from Predictive Factory
This blog is more dedicated to the trial version of Predictive Analytics – Predictive Factory..It will guide you in your first steps a a basic workflow to create a classification analysis base on the census data set.
Open pre-configured project
Log on with the user created during configuration: Trial_User1 whose password is Factory4321.
Your 1st screen is::
There are 3 projects:
- Census_Analysis that we are about to use.
- Telco_Churn_Analysis in which you can predict the customers who are about to churn.
- Your_Project in which you can create and manage predictive models on your data.
Click on project Census_Analysis. This project is already configured with a modeling server where:
- Models that will be generated will be stored models are stored. in folder: “C:\Program Files\SAP BusinessObjects Predictive Analytics\Server\Samples\Models”
- Dataset is stored in folder “C:\Program Files\SAP BusinessObjects Predictive Analytics\Server\Samples” which contains cvs files.
Here is a screenshot of the definition of the modeling server for this project.
Add models to the project
Click on Models tab and then on button Add Model. In the list box, select Classification.
Then give a name and a description to the model. Precise the dataset which is chosen from the data connections set for the project.
Select then the target variable and the variables you want to exclude from the model.
Click on the Save and Train button at the top right of the window.
Model is saved that training is starting.
After few seconds, the model is trained and we can see its status and indicators of its relevance.
Inspect the trained model
The screenshot above is showing the 1st version of the model named “Classification 1”. To get more details about this model, just click on it.
In tab “Reports”, a dashboard is displayed. It is divided into 4 sections.
The performance indicators.
The target statistics
The variables which influence the most the target variable
And the percentage of detected target.
Applying a model
Go back to the list of versions of a model. Select the model with a click on the left side of the version one of the model.
Click on the version and in the new screen you can click on the link “Apply” to apply the model once.
Select the dataset on which to apply the model, in which folder/file to store the result and what are the output column to include.
Go in folder: C:\Program Files\SAP BusinessObjects Predictive Analytics\Server\Samples\Census and open file CensusApply.txt
The last 2 columns are the actual call and the predicted value:
Scheduling a Recurrence
Go back to Version of this classification.
Before to schedule a task on a model, a model must be activated.At one time, only one model can be active. Click on the “Set as Active button. The list should look like this:
Click on the tab “Tasks” and add a Model Application Task.
Provide the following information to define the task.
Next step is the scheduling. For the moment, keep the default settings.
Finally, click on the Save button to record the task.
If a scheduling is defined, the task will start automatically. Otherwise, select the task to run manually and click on the start button.
Once completed, a notification is displayed to alert you.
Click on the notification to display the result. Here we see that the new columns “decision_rr_class” and “proba_rr_class” have been added. They contain the predictions with the associated probabilities.
In the folder where the dataset is, there is a new file named “CensusApply2.txt” which contains the predictions for all individuals of the dataset.
Retrain a model
With the time, it is possible that we observe a deviation between the predictions done by the application of a model and the real value of the target variable. The reason is that new cases not present in the training dataset arrive more and more. The solution is to refresh the training dataset with such new cases and retrain the model.
To retrain the model, go to the “Tasks” panel and create a new Retrain task.
Complete the fields like this and if needed add a schedule to automate this task.
Save the task.
To run this task manually, select it and click on the Start icon.
Once finished, a notification is displayed.
Click on this notification, to see the results which are the dashboard of the model.
You can now compare with the results of the first model and decide to replace it with this new model.
Normally at this time, you should be able to:
- Add models to a project
- Inspect the training model
- Apply a model on another dataset
- Schedule tasks
Next steps could to come back to these features through the videos available in the Getting Started guide and the online help of SAP Predictive Factory.
You can also use your own datasets. Refer to the Welcome page available on the Desktop to know where to upload them.