
Detecting unwanted bias in engagement policy conditions
7 Tasks
15 mins
Beginner
Pega Customer Decision Hub 8.5
English
Scenario
U+ Bank is currently doing cross-sell on the web by showing various credit cards to its customers.
The bank wants to run an ethical bias simulation and identify any unwanted bias in the engagement policy conditions. If any bias is detected, the bank would like to adjust the bias threshold to allow little bias to comply with their business regulations and requirements.
Use the following credentials to log in to the exercise system:
Role |
User name |
Password |
---|---|---|
Decisioning Analyst |
CDHAnalyst |
rules |
Your assignment consists of the following tasks:
Task 1: Prepare data set for simulation run
Run the PrepareSampledCustomers_REF data flow to prepare the data set for the simulation run.
Note: The Sampled Customers is not available in a persisted store. To initialize the customer data, first run the PrepareSampledCustomers_REF data flow.
If you already initiated the customer data as part of the previous challenge, you need not perform Task 1.
If you already initiated the customer data as part of the previous challenge, you need not perform Task 1.
Task 2: Create an ethical bias policy
Create an ethical bias policy to include the .Customer.Age and .Customer.Gender properties with Data-Decision-Request-Customer class as the context.
Task 3: Create an ethical bias simulation run
Create an ethical bias simulation run to check unwanted bias in the engagement policy conditions.
Task 4: Examine the simulation results
Examine the simulation results to identify on which property bias was detected.
Task 5: Check engagement policy conditions
Check the engagement policy conditions to know which condition is causing the bias.
Task 6: Modify the ethical bias policy
Modify the ethical bias policy to increase the threshold of the Age property.
Task 7: Re-run the ethical bias simulation run
Re-run the ethical bias simulation to verify the changes made to the ethical bias policy.
Challenge Walkthrough
Detailed Tasks
1 Prepare data set for simulation run
- In the navigation pane of Pega Customer Decision Hub, click Data > Data Flows.
- Search for and then open the PrepareSampledCustomers_REF data flow to prepare the data set used for simulations. This data is based on a Monte Carlo dataset, which is generated.
Note: The Monte Carlo data set generates a mock data set. As a result, different simulation runs have different results.
- Click Actions > Run.
Note: Notice that the prospect data is populated once the test run is complete.
- Close the data flow Test run window.
2 Create an ethical bias policy
- Log in as Decisioning Analyst with username CDHAnalyst and password rules.
- In the header of the Pega Customer Decision Hub portal, click the Configuration icon, and then select Ethical Bias Policy.
- In the Context field, enter or select Data-Decision-Request-Customer.
- Click Add bias field to include the properties that you want to test.
- In the Add bias field window, in the Field field, enter or select .Customer.Age.
- Click Next.
- Leave the ‘Do the numbers represent categories?’ set to No.
- Click Add bias field.
-
In the Add bias field window, in the Field field, enter or select .Customer.Gender.
- Click Age bias field.
- Click the Bias threshold tab.
- In the Sales section, click Customer.Age.
- In the Customer.Age window, select 0 Gini (No shift).
- In the Sales section, click Customer.Gender.
- In the Customer.Gender window, select 1 Rate ratio (No shift).
- Click Save.
3 Create an ethical bias simulation run
- In the navigation pane of the Pega Customer Decision Hub portal, click Simulation Testing.
- In the upper-right corner, click Create.
- In the Purpose list, select Ethical Bias. Note that the bias fields are listed.
- In the Configure inputs section, next to Strategy, click Configure to select a strategy on which you want to run the simulation.
- In the Strategy dialog box, click Add to select the CreditCards (NBA_Sales_Creaditcards) strategy.
- Click Apply to add the strategy.
- In the Configure inputs section, next to Audience, click Configure to select an audience on which you want to run the simulation.
- In the Audience dialog box, click Add to select the SampledCustomers audience.
- In the Simulation ID prefix field, enter EthicalBias_NBASales.
- Click Done.
Note: The simulation results are output to the Insights data set.
- In the Output management section, select the Overwrite outputs from previous simulations check box.
Note: The simulation has two bias reports automatically available as output.
- In the upper right, click Submit and Run to run the simulation.
4 Examine the simulation results
- Once the simulation run is complete, note that bias is identified.
- Click Bias report to learn which property has the bias identified and for which action.
- In the Bias report, sort the report on the Bias detected field to list the actions with bias on the top.
Note: The bias is detected on Age.
- Close the report.
5 Check the engagement policy conditions
- In the navigation pane of Pega Customer Decision Hub, click Next-Best-Action > Designer.
- Click Engagement policy.
- Click Creditcards.
- Verify that Age is defined as an eligibility condition.
Note: As Age is used as an eligibility condition, which cannot be ignored, the bias threshold for the property needs to be adjusted to allow little bias.
- Close the Next Best Action Designer.
6 Modify the ethical bias policy
- In the upper right, click the Configuration icon, and then select Ethical Bias Policy.
- In the Sales section, click Customer.Age.
- In the Customer.Age window, select 0.1 Gini.
- Click Save.
7 Re-run the ethical bias simulation run
- In the left navigation pane of Pega Customer Decision Hub, click Simulation Testing.
- Click on EthicalBias_NBASales-1 to open the ethical bias run.
- Click Restart to re-run the ethical bias simulation.
- Click Submit to confirm.
Note: There is no bias detected now.
- Open the Bias report.
- Verify that the Bias Detected field is false for all the actions.
Note: As an additional task, you can run an ethical bias simulation at the Trigger_NBA_Sales_Creditcards strategy level.
Once the simulation executed, analyze why a bias is detected on Gender and how you can avoid that.
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?