Skip to main content

Exporting historical data

5 Tasks

15 mins

Visible to: All users
Beginner Pega Customer Decision Hub 8.8 English
Verify the version tags to ensure you are consuming the intended content or, complete the latest version.

Scenario

U+ Bank implements Pega Customer Decision Hub™ to display a personalized credit card offer to eligible customers on their website. As a data scientist, you want to export the raw data used by the Web Click Through Rate adaptive model in the production phase of the project, to optimize the click-through rate of the web banners that contain the credit card offers.

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: Configure the recording of historical data

Change the settings of the Web Click Through Rate adaptive model to enable the recording of historical data generated by the model. Set the sample percentage for both positive and negative responses to 100%.

Caution: These sampling percentages are for demonstration purposes only. A web banner typically has a very high number of negative responses, so a very low sampling percentage is appropriate for negative responses while maintaining 100% for the positive responses.

Task 2: Create a data set

Create a new data set and set the Apply To field to UBank-CDH-Data-Customer to set the class. Map the data set to the file in the repository that contains the historical data.

Task 3: Trigger the creation of customer interaction records

On the U+ Bank website, log in multiple times and generate two negative responses by ignoring the banner and one positive response by clicking the banner.

Task 4: Export the data set

In Dev Studio, export the data set. The data set is exported in the JSON format.

Task 5: Examine the JSON file

Examine the file by answering the following questions:

  • In the first record, who is the customer, what is the treatment the customer received, and what is the outcome of the interaction?
  • How many predictors have a captured value, and how many predictors are configured in the adaptive model of the first record? What explains the difference?

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Configure the recording of historical data

  1. On the exercise system landing page, click Pega CRM suite to log in to Customer Decision Hub.
  2. Log in as a data scientist:
    1. In the User name field, enter DataScientist
    2. In the Password field, enter rules.
  3. In the navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio to open Prediction Studio.
  4. On the Predict Web Propensity tile, click Open prediction to open the prediction.
  5. On the Models tab, in the Supporting models section, click Web_Click_through_Rate to open the model.
    Supporting models section
  6. On the Settings tab, in the Recording historical data section, select the Recording historical data checkbox to set the data as active.
  7. Set the sample percentage for NoResponse to 100% to record all responses.
    This image shows the Sample percentage setting
    Caution: These sampling percentages are for demonstration purposes only. A web banner typically has a very high number of negative responses, so a very low sampling percentage is appropriate for negative responses while maintaining 100% for the positive responses.
  1. In the upper-right corner, click Save.

2 Create a data set

  1. In the navigation pane of Prediction Studio, click Data > Data sets.
  2. In the upper-right corner, click New to create a new data set.
  3. Configure the data set with the following information:
    1. Name: ADMPayload
    2. Type: File
    3. Apply to: Ubank-CDH-Data-Customer
    4. Add to ruleset: CDH-Rules
      This image shows the New data set configuration
  4. Click Create to create the data set.
  5. In the Configuration section, select the CDHData repository.
  6. In the File path field, set the file path to /ADM/Rule-Decision-AdaptiveModel/Data-Decision-Request-Customer-CDH/Web_Click_Through_Rate/records*.json.
  7. Click Save.

3 Trigger the creation of customer interaction records

  1. On the exercise system landing page, click U+ Bank to open the U+ Bank website.
  2. In the upper-right corner, log in as customer Troy.
  3. Ignore the offer, and then log out.
  4. Log in as customer Barbara.
  5. Ignore the offer, and then log out.
  6. Log in as customer Joanna.
  7. On the banner, click Learn more to register a positive response.

4 Export the data set

  1. Return to Prediction Studio, and in the upper-left corner, switch to Dev Studio.
  2. In the upper-right corner, in the search text box, enter ADMPayload.
  3. In the search results list, click ADMPayload to open the data set.
    This image shows the search results for ADMPayload
  4. In the upper-right corner, click Actions > Export to open the Export data set dialog box.
  5. In the Export data set dialog box, click Export.
    Note: It might take several minutes to populate the data set. If the number of processed records does not match the number of logins, close the Export data set dialog box, and then retry.
  1. Click Download file, and then save the data.json file to your local machine.
    This image shows the Export data set dialog box
  2. Click Done to close the dialog box.
  3. In the upper-left corner, switch to Prediction Studio.

5 Examine the JSON file

  1. On your local machine, extract the data.json file from the downloaded ZIP file.
  2. Open the data.json file in a text editor that displays the JSON format correctly.
    Tip: There are many options for compatible text editors available on the internet, such as Notepad++.
  1. Question – In the first record, who is the customer, what is the treatment the customer received, and what is the outcome of the interaction?
    1. The customer ID is recorded as the Decision_SubjectID property, the treatment is recorded as the Context_Treatment, and the outcome is recorded as the Decision_Outcome property.
  2. Question – How many predictors have a captured value, and how many predictors are configured in the adaptive model of the first record? What explains the difference?
    1. In the JSON file, count the predictors for which a value has been recorded.
  3. In Prediction Studio, in the navigation pane on the left, click Predictions.
  4. On the Predict Web Propensity tile, click Open prediction to open the prediction.
  5. On the Models tab, in the Supporting models section, click Web_Click_through_Rate to open the model.
  6. On the Predictors tab, note the number of configured fields.
    Tip: The number of predictors for which a value is recorded is lower than the number of potential predictors configured in the model. The model activates only predictors that perform above the threshold configured on the Settings tab.
    This image shows the available predictors


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

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