Skip to main content

Exporting adaptive model data for external analysis

3 Tasks

25 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 cross-selling of their credit cards on the web by using Pega Customer Decision Hub™. Self-learning, adaptive models drive the predictions that support the Next Best Actions for each customer. In the production phase of the project, you can export the data from the Adaptive Decision Management datamart to further analyze the performance of your online models over time, across channels, issues, and groups, in your external data analysis tool of choice.

To limit the scope and size of the data set, you can modify the data flows that export the data files. This allows you to select the data for the models that interest you.

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: Generate the monitoring export artifacts

In the Prediction Studio settings, configure the Monitoring database export to generate the monitoring export artifacts.

Task 2: Modify the generated ModelSnapshot data flow

Add a filter component to the ModelSnapshot data flow to select model snapshots for the Web Click Through Rate model.

Task 3: Modify the generated PredSnapshot data flow

Add a Compose component to the PredSnapshot data flow to select predictor binning snapshots for the Web Click Through Rate model.

Task 4: Confirm your work

Export the monitoring database and examine the content of the JSON files.

 

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 Generate the monitoring export artifacts

  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. In the navigation pane of Prediction Studio, click Settings > Prediction Studio settings to navigate to the settings page.
  5. Scroll down to the Monitoring database export section, and then click Configure to open the Export monitoring database dialog box.
  6. In the Export monitoring database dialog box, set the Ruleset to CDH-Rules and click Submit to generate the monitoring export artifacts.
  7. Close the Export monitoring database dialog box.
    The export monitoring data base settings
    Note: These monitoring export artifacts are typically generated in a development environment and deployed to higher environments through the enterprise pipeline.
  1. In the lower-left corner, click Back to Customer Decision Hub.

2 Modify the generated ModelSnapshot data flow

  1. In the search field, enter ModelSnapshot, and then press Enter to search for the ModelSnapshot data flow.
  2. In the search results, click the ModelSnapshot data flow to open the data flow canvas.
    The search results for ModelSnapshot
    Note: The name of the data flow contains a random identifier that is created during this exercise.
  1. In the upper-right corner, click Check out.
  2. Click the Add icon, and then click Filter to add a filter component to the data flow.
    The plus sign to add a component to the data flow
  3. Right-click the filter component, and then click Properties to configure the component.
    1. In the Filter configurations dialog box, in the Name field, enter Selected models only.
    2. In the Filter conditions section, click Add condition.
    3. Enter a condition that reads: When .pyConfigurationName = "Web_Click_Through_Rate".
      The Filter configurations dialogue box
    4. Click Submit to close the Filter configurations dialog box.
      The completed data flow
  4. In the upper-right corner, click Check in.
  5. In the Check in dialog box, enter appropriate comments, and then click Check in.
  6. In the upper-right corner, click Save as to configure a new dataflow:
    1. In the Name field, enter Selected Model Snapshots.
    2. In the Add to rules field, enter or select CDHRules
      The Data flow record configuration
    3. In the upper-right corner, click Create and open.
    4. In the upper-right corner, click Check out.
    5. Right-click the destination component, and then click Properties to configure the component.
    6. In the Destination configurations dialog box, in the Destination field, select Abstract.
      The save as data flow with abstract destination
  7. Click Submit to close the dialog box.
  8. In the upper-right corner, click Check in.
  9. In the Check in dialog box, enter appropriate comments, and then click Submit.

3 Modify the generated PredSnapshot data flow

  1. In the search field, enter PredSnapshot, and then press Enter to search for the PredSnapshot data flow.
  2. In the search results, click the PredSnapshot data flow to open the data flow canvas.
    The search results for PredSnapshot
    Note: The name of the data flow contains a random identifier that is created during this exercise.
  1. In the upper-right corner, click Check out.
  2. Click the Add icon, and then click Compose to add a second source component.
    The plus sign to add a second source to the data flow
  3. Right-click the second source component, and then click Properties to configure the component.
    1. In the Source configurations dialog box, in the Source field, select Data flow.
    2. In the Input class field, enter or select Data-Decision-ADM-ModelSnapshot.
    3. In the Data flow field, enter or select SelectedModelSnapshots.
    4. Click Submit to close the dialog box.
      The data flow so far configured
  4. Right-click the Compose component, then click Properties to configure the component.
  5. In the Compose configurations dialog box, in the Name field, enter Add model data.
  6. In the Property field, enter .ModelData, and then click the gear icon on the right of the Property field to create a new property.
    The location of the Gear icon to configure the model data property
  7. In the Add to ruleset field, ensure the CDH-Rules ruleset is selected.
  8. In the upper-right corner, click Create and open.
  9. In the Property type section, click Change.
  10. In the Page column, click Single page to change the property type.
  11. In the Page definition field, enter or select Data-Decision-ADM-ModelSnapshot.
    The page definition of the modeldata property
  12. In the upper-right corner, click Save, and then close the ModelData page.
  13. In the Compose configurations dialog box, in the Compose when conditions below are met section, enter or select the condition to read When pyModelID is equal to .pyModelID.
    The Compose configurations dialogue box
  14. Click Submit to close the dialog box.
  15. Click the Add icon on the Compose component, and then select Filter.
    The addition of a new filter component to the data flow
  16. Right-click the Filter component, and then click Properties to configure the component.
  17. In the Name field, enter Selected snapshots only.
  18. In the Filter conditions section, click Add condition.
  19. Enter the condition to read When .ModelData.pyModelID != "" to filter out predictor snapshots that do not match with a selected model and are therefore irrelevant.
    The filter condition that selects the relevant snapshots
  20. Click Submit to close the dialog box.
    The completed predictor snapshots data flow
  21. In the upper-right corner, click Check in.
  22. In the Check in dialog box, enter appropriate comments, and then click Submit.

Confirm your work

  1. In the navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio to open Prediction Studio.
  2. In the upper-right corner, click Actions > Export > Export monitoring database.
  3. Click Export to start the process.
    Note: This action is typically done in a Business Operations environment where the adaptive models represent the production data. For the purpose of this exercise, and in general for testing purposes, you can also run this export in a development environment like the exercise system used for this challenge.
  1. In the upper-right corner, click Notifications to confirm that the export has been initialized, and then completed.
    The notification that the data export is finished
  2. In the upper-left corner, click Prediction Studio and select DEV Studio to switch portals.
  3. In the header of DEV Studio, click Configure > Decisioning > Decisions > Data flows > Batch processing to open the Data flows tab.
    The DEV Studio menu to go to the batch processing page
  4. Click the ModelSnapshot data flow run.
    The model snapshot data flow run
  5. Right-click on the destination component, and then click Open data set.
  6. In the upper-right corner, click Actions > Export to open the Export data set dialog box.
  7. In the Export data set dialog box, click Export.
  8. After the export process finishes, click Download file to download the file to your local system.
  9. Click Done to close the dialog box.
    The Export data set dialogue box
  10. Open the ZIP file, and then confirm that the data.json file only contains the model snapshots for the adaptive models based on the Web Click Through Rate model. configuration.
    The model data in the json file
    Note: The JSON file can be used for analysis in external tools.
  1. Return to the Batch processing page in Dev Studio, and then click the PredSnapshot data flow run.
    The predictor snapshots data flow run
  2. Repeat steps 7-11 to inspect the predictor binning snapshots.
  3. Open the ZIP file, and then confirm that the data.json file only contains the predictor binning snapshots for the adaptive models based on the Web Click Through Rate configuration.


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