Building models with Pega machine learning
6 Tasks
15 mins
Beginner
Pega Customer Decision Hub '23
English
Scenario
U+ Bank implements Customer Decision Hub™ to determine which credit card offer to show a customer on the bank's website. To reduce the number of clients that leave the bank, the business wants to make use of the historical data that the bank has collected on customers that have churned in the past to predict which customers are likely to leave the bank soon. The bank wants to show retention offers to the potential churners, instead of credit card offers.
As a data scientist, your task is to create a predictive model that predicts churn. You decide to create the model by using Pega machine learning.
Use the following credentials to log in to the exercise system:
Role | User name | Password |
---|---|---|
Data Scientist | DataScientist | rules |
Your assignment consists of the following tasks:
Task 1: Create a new predictive model
Create a new predictive model, ChurnPegaML, by using the Churn Modeling template in the Retention category.
Task 2: Prepare the data
Load the data set by using the CustomerData.zip file. Set the type of predictors that have no predictive power, such as CustomerID, to Not used. In the Outcome definition, use a Binary outcome type and Outcome as the outcome field. Map the values of the outcome field to the outcome categories.
Task 3: Analyze the data
Examine the trends exhibited by the best-performing predictors. Create a virtual field by combining several numerical predictors, and then examine the trend exhibited by this new predictor.
Task 4: Develop predictive models
For predictor grouping, use the best predictor of each group. Create a new bivariate model.
Task 5: Analyze the models
Compare the scores of the three models. Pay particular attention to Discrimination.
Task 6: Select model
Select the Regression model. Ensure that all predictors are mapped to customer properties. Reclassify the classes into a loyal class and a churned class. Save the model.
Challenge Walkthrough
Detailed Tasks
1 Create a predictive model
- On the exercise system landing page, click Launch Pega Infinity™ to log in to Customer Decision Hub.
- Log in as a data scientist:
- In the User name field, enter DataScientist
- In the Password field, enter rules.
- In the Work from 1:1 Operations Manager section, click CR-1 to open the change request.
- In the Scope of changes section, click Create, and then select Decision > Predictive model.
- In the Predictive Model Record Configuration section, in the Label field, enter ChurnPegaML.
- In the Context section, in the Apply to field, enter or select UBank-CDH-Data-Customer.
- In the upper-right corner, click Create and open, and then click Create new model.
- In the Category list, select Retention.
- In the Template list, select Churn Modeling.
- Click Start to proceed to the data preparation step.
2 Prepare the data
- Download and extract the CustomerData.csv file.
- In the Source selection section, click Choose File, and then select the CustomerData.csv file.
- Check the data, and then click Next to proceed to the sample construction step.
- In the CustomerID field, change the type to Not used.
- Click Next to proceed to the outcome definition step.
- In the Outcome definition section, in the Outcome type list, confirm that Binary is selected.
- In the Outcome field to predict list, select Outcome.
- In the Churn row, in the Outcome category column, select churned.
- In the Loyal row, in the Outcome category column, confirm that loyal Is selected.
- Confirm that the number of cases in the development, validation, and test sets is approximately equal for both outcome categories.
- Click Next to proceed to the data analysis step.
3 Analyze the data
- In the list of predictors, click Age and examine the grouping for this predictor.
- In the upper-right corner, click Cancel to close the predictor report.
- Click New virtual field to open the Virtual field dialog box.
- In the Virtual field dialog box, in the Name field, enter Age*CreditScore.
- Click Fields, select Age, click Insert, and then enter *.
- Click Fields, select CreditScore, and then click Insert.
- Click Save & close.
- Confirm that the newly created predictor outperforms the two original predictors.
- Click Next to proceed to the model development step.
4 Develop predictive models
- In the Predictor grouping section, select Use best of each group.
- Click Next to proceed to the model creation step.
- In the Model creation section, in the Create model list, select Bivariate.
- In the upper-right corner, click Submit to add the model to the model list.
- Click Next to proceed to the model analysis step.
5 Analyze the models
- On the Score comparison page, ensure that all the model checkboxes are selected.
- Click Analyze charts to access the model analysis.
- On the Discrimination tab, examine the results.
Note: The regression model outperforms the decision tree model and the bivariate model as it has the largest area under the curve (AUC). However, before you choose a model, consider the number of predictors required by the model. Under certain circumstances, you might decide to select a predicting model that is performing lower but has fewer predictors.
- In the upper-left corner, click the arrow next to Model analysis charts to return to the Score comparison page.
- Click Next. On this page, you can analyze the score distribution.
- Click Next. On this page, you can analyze class comparison.
- In the Model selection section, ensure that the Regression model is selected.
- Click Finish & Update to proceed to the model selection step.
6 Select the model
- In the navigation pane of Prediction Studio, click Models to view the model list.
- Click ChurnPegaML to configure the model.
- On the Model tab, click the Gear icon in the Outcome definition section.
- In the Label 'churned' as field, enter Churn.
- In the Label 'loyal' as field, enter Loyal, and then click OK to submit the outcome definitions.
- In the Confirm outcome update dialog box, click Confirm.
- In the Expected score distribution section, click the area between class 6 and class 7 in the score distribution chart.
- In the Classification groups section, in the class 1-6 row, in the Name column, enter Loyal.
- In the Class 7-10 row, in the Name column, enter Churn.
- On the Mapping tab, ensure that all predictors are mapped to the appropriate customer fields.
- In the upper-right corner, click Save.
This Challenge is to practice what you learned in the following Module:
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?