Skip to main content

Demonstrating adaptive learning

Archived

4 Tasks

20 mins

Pega Customer Decision Hub 8.4
Visible to: All users
Beginner Pega Customer Decision Hub 8.4 English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded.

Scenario

U+ Bank is about to implement adaptive models in the web channel to increase the click-through rates of the banners that promote their four credit cards. As a data scientist, you are asked to demonstrate that the models correctly detect potential predictors of customer interest.

As this is the implementation phase, no actual customer data is currently available. Therefore, you use a Monte Carlo data set, which provides random data for 10.000 customers to create simulated customer data. Customer response data is also not available at this stage, so you need to simulate customer responses.

To train the models, you run a Make Decision data flow that references the adaptive models and a Capture Response data flow that manipulates the customer responses to three of the credit cards based on their age, gender, and average spending properties. For comparison, the responses for the Standard Card are random.

To demonstrate that the adaptive model correctly detects age, gender, and average spending as strong predictors for customer interest, open the model report and the predictor reports and confirm that these properties are detected as strong predictors of customer behavior.

Use the following credentials to log in to the exercise system:

Role Username Password
Data Scientist DataScientist rules

Your assignment consists of the following tasks:

Task 1: Populate the customer data set

Build and run a data flow that uses the MonteCarlo data set as input and stores the simulated customer data in the CustomerData Decision Data Store.

Note: You need to create the data flow on the Data-Decision-Request-Customer class. The data flow will ingest the MonteCarlo data set, then set the pySubjectID to .Customer.CustomerID using a Convert shape, and finally write the results to CustomerData data set.

Task 2: Make decisions

Run the MakeDecision_Demo data flow in the Data-Decision-Request-Customer class that references the Web_Click_Through adaptive model on 10.000 customers.

Task 3: Capture responses

Run the CaptureResponse_Demo data flow that introduces a bias in the customer responses based on the Age, Gender and AverageSpent customer properties.

Note: Inspect the ResponseStrategy used in the data flow. Specifically have a look at the RewardsCard scorecard to see which values of the Age and which values of AvergageSpent would result in a higher score, meaning a higher probability of a positive response.

Task 4: Demonstrate adaptive learning

Demonstrate that the adaptive model detects the Age and AverageSpent customer properties as strong predictors of customer interest.

Challenge Walkthrough

Detailed Tasks

1 Populate the customer data set

  1. Log in as a Data Scientist with user name DataScientist and password rules.
  2. In the navigation pane on the left, click Data > Data Flows.
  3. On the Data Flows landing page, click Create.
  4. In the Create Data Flow tab, enter the following information:
    1. In the short description text box, enter PrepareCustomerData.
    2. In the Apply to field, enter Data-Decision-Request-Customer.
      Create
    3. Click Create and open.
  5. On the data flow canvas, right-click the blue source component, and then select Properties.
    1. In the Import data from dialog box, in the Source list, select Data set.
    2. In the Data set field, enter or select MonteCarlo.
    3. Click Submit to close the Import data from dialog box.
      Import
  6. On the MonteCarlo component, click the Add icon, and then select Convert.
    Icon
  7. Right-click the Convert component, and then select Properties.
    1. Configure the component to convert into page(s) of class Data-Decision-Request-Customer.
    2. Enable Auto-copy properties with identical names.
    3. Click Add mapping, and then set .pySubjectID equal to .Customer.CustomerID.
      Field mapping
    4. Click Submit.
  8. Right-click the grey destination component, and then select Properties.
    1. In the Destination list, select Data set.
    2. In the Data set field, enter or select CustomerData.
      Output
    3. Click Submit.
  9. Click Save.
    Flow prepare
  10. Click Actions > Run.
  11. Scroll down and verify that the 10,000 records are processed in the last shape.
    Records
  12. Close the Data flow test run window and the PrepareCustomerData data flow.

2 Make decisions

  1. On the Data Flows landing page, double-click MakeDecision_Demo to open the data flow.
  2. Right-click on the first shape, and then select Preview to open the Input Data Preview window.
  3. In the Input data preview window, expand one of the results. Notice that the result contains the pySubjectID and the customer data.
    Results1
Results2
  1. Close the Input Data Preview window.
  2. Click Actions > Run.
    Note: Please allow some time for the data flow to start up.
  1. Confirm that a decision has been made for a subset of the 10,000 customers (the exact number may vary due to the randomness of the data generated by the Monte Carlo data set). Note that from the entire 10,000 customer population, roughly 7,000 get an offer. The rest are not receiving any offer due to implemented contact policies (eligibility, applicability, and suitability rules).
    Destination
  2. Close the Data flow test run window.
  3. Right click on the second shape and select Preview to open the Input Data Preview window.
  4. In the Input Data Preview window, expand one of the results. Notice that the result contains the customer data and the decision made by the strategy.
    Imput data preview
  5. Close the Input Data Preview window and the MakeDecision_Demo data flow.

3 Capture responses

  1. On the Data Flows landing page, double-click CaptureResponse_Demo.
  2. On the canvas, open the properties of the Decision strategy component.
  3. Click the Gear icon next to the Strategy field to open the ResponseStrategy.
    Strategy
  4. All offers receive a fraction of random offers. Notice that this fraction (the .RandomPopulation property) is set to 100% for the StandardCard offer, so it only receives random responses,
    Random 1

    while the random offer fraction for Rewards Card is set to 15%.
    Random 2
  5. On the strategy canvas, open the properties of the RewardsCard SC scorecard model component, and then select Open Scorecard. Notice that customers in their 30s have a higher score then those in their 50s.
    Predictor 1
  6. Scroll down, and notice that customers with a high .AverageSpend property have a higher score.
    Predictor 2
  7. Scroll up and click the Results tab. Notice that the response model is set up in such a way that customers with a higher score, a score value above the Cutoff value, are segmented as interested (Clicked).
    Cutoff
  8. Close the score card and the response strategy.
  9. Return to the CaptureResponse_Demo data flow, and then click Actions > Run.
  10. Confirm that the responses have been captured for the roughly 7,000 customers to whom an offer has been made.
  11. Close the Data flow test run window.

4 Demonstrate adaptive learning

  1. In the navigation pane on the left, click Intelligence > Prediction Studio.
  2. Open the Web_Click_Though_Rate adaptive model.
    Model
  3. Click Refresh data.
    Refresh
  4. Notice that for each credit card banner an adaptive model has been created. The performance of the StandardCard model is the lowest, close to 50%. This is correct as the StandardCard receives only random responses.
    Bubble chart
  5. Scroll down and open the Model report for the RewardsCard.
    Model report
  6. Notice that the model has identified the Age and AverageSpent customer properties as the predictors with the highest performance. This is correct, as the responses were biased on these properties.
    Predictors
  7. Click the Customer.Age predictor.
  8. Notice that the highest customer interest is correctly predicted when they are in late 30s. This demonstrates that the adaptive models have correctly learned from the simulated customer responses.
    Age
  9. Return to the Model report.
    Return
  10. Open the Customer.AverageSpent predictor. Notice that customer interest is correctly predicted to increase with higher values for this customer property.
    Spent


Available in the following mission:

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice