
Exporting adaptive model data for external analysis
3 Tasks
15 mins
Beginner
Pega Customer Decision Hub 8.7
English
Scenario
U+ Bank is implementing 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.
Export the data from the Adaptive Decision Management (ADM) 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, create data flows that select the data for the models that interest you.
Use the following credentials to log in to the exercise system:
Role | User name | Password |
---|---|---|
System Architect | SystemArchitect | rules |
Your assignment consists of the following tasks:
Task 1: Export the ADM data sets
As a system architect, export the pyModelSnapshots and pyADMPredictorSnapshots data sets as JSON files that contain all available data on the adaptive models in the system. Next, verify the JSON export. You can use the exported JSON files for further analysis.
Task 2: Create data flows to export selected models
Limit the size of the data set by creating a data flow that composes the model snapshots and the predictor snapshots of models based on the Web Click Through Rate model configuration and stores the data in a new data set.
Task 3: Export the subset of the adaptive model data
Run the data flow to populate the dataset that contains model and predictor snapshots of the selected models. Verify the JSON format.
Challenge Walkthrough
Detailed Tasks
1 Export the ADM data sets
- On the exercise system landing page, click Pega CRM suite to log in to Dev Studio.
- Log in as a System Architect with User name SystemArchitect using Password rules.
- In the search field, enter pyModelSnapshots, and then press Enter to search for the pyModelSnapshots data set.
- Click pyModelSnapshots to open the data set.
- In the upper-right corner, click Actions > Export to start the export process.
- In the Export data set dialog box, click Export.
- After the export process finishes, click Download file to download the file to your local system.
- Click Done to close the dialog box.
- Repeat steps 3-8 for the pyADMPredictorSnapshots data set.
- Open the data.json files from the downloaded ZIP files to confirm that you have exported the model data and the predictor data.
2 Create data flows to export selected models
- In the menu bar of Dev Studio, click Create > Data model > Data flow to create a new data flow.
- In the Data Flow Record Configuration section, in the Label field, enter SelectedModelSnapshots.
- In the Context section, in the Apply to field, enter Data-Decision-ADM-ModelSnapshot to define the context of the data flow.
- In the Context section, in the Add to ruleset field, enter or select CDH-Rules.
Tip: As best practice, use the CDH-Rules and not the CDH-Artifacts to create such rules.
- In the upper-right corner, click Create and open.
- Right-click the source component, and then click Properties to configure the source data set.
- In the Source configurations dialog box, in the Source field, select Data set.
- In the Data set field, enter or select pyModelSnapshots.
- Click Submit to close the dialog box.
- Click the Add icon, and then click Filter to add a filter component to the data flow.
- Right-click the filter component, and then click Properties to configure the component.
- In the Filter configurations dialog box, in the Name field, enter Selected models only.
- In the Filter conditions section, click Add condition.
- Enter the condition to read: .pyConfigurationName = "Web_Click_Through_Rate".
- Click Submit to close the dialog box.
- In the upper-right corner, click Save.
- In the menu bar of Dev Studio, click Create > Data model > Data flow to create a new data flow.
- In the Data Flow Record Configuration section, in the Label field, enter SelectedPredictorSnapshots.
- In the Context section, in the Apply to field, enter Data-Decision-ADM-PredictorBinningSnapshot to define the context of the data flow.
- In the Context section, in the Add to ruleset field, ensure CDH-Rules is selected.
- In the upper-right corner, click Create and open.
- Right-click the source component, and then click Properties to configure the source data set.
- In the Source configurations dialog box, in the Source field, select Data set.
- In the Data set field, enter or select pyADMPredictorSnapshots.
- Click Submit to close the dialog box.
- Click the Add icon, and then click Compose to add a compose component to the data flow.
- Right-click the second source component, and then click Properties to configure the component.
- In the Source configurations dialog box, in the Source field, select Data flow.
- In the Input class field, enter or select Data-Decision-ADM-ModelSnapshot.
- In the Data flow field, enter or select SelectedModelSnapshots.
- Click Submit to close the dialog box.
- Right-click the Compose component, then click Properties to configure the component.
- In the Compose configurations dialog box, in the Name field, enter Add model data.
- In the Property field, enter .ModelData, and then click the gear icon on the right of the Property field to create a new property.
- In the upper-right corner, click Create and open.
- In the Property type section, click Change.
- In the Page column, click Single page to change the property type.
- In the Page definition field, enter or select Data-Decision-ADM-ModelSnapshot.
- In the upper-right corner, click Save, and then close the ModelData tab.
- In the Compose configurations dialog box, in the Compose when conditions below are met section, enter or select the condition to read When pyModelID = .pyModelID.
- Click Submit to close the dialog box.
- Click the Add icon on the Compose component, and then select Filter.
- Right-click the Filter component, and then click Properties to configure the component.
- In the Name field, enter Selected models only.
- In the Filter conditions section, click Add condition.
- 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.
- Click Submit to close the dialog box.
- Right-click the destination component, and then click Properties to configure the destination data set.
- In the Destination configurations dialog box, in the Destination field, select Data set.
- In the Data set field, enter SelectedSnapshots, and then click the gear icon on the right of the Data set field to create a new property.
- In the Data Set Record Configuration dialog box, in the Type field, select Decision Data Store.
- In the upper-right corner, click Create and open.
- In the upper-right corner, click Save, and then close the SelectedSnapshots tab.
- In the Destination configurations dialog box, click Submit to close the dialog box.
- In the upper-right, click Save.
3 Export the subset of the adaptive model data
- In the upper-right corner, click Actions > Run to run the SelectedPredictorSnapshots data flow.
- In the upper-right, click Submit.
- In the Data Flow Run DF-Test-1001 tab, in the upper-right corner, click Start.
- After the data flow run finishes, return to the SelectedPredictorSnapshots data flow.
- Right click the destination component, and then select Open data set.
- In the upper-right corner, click Actions > Export to start the export process.
- In the Export data set dialog box, click Export.
- After the export process finishes, click Download file to download the file to your local system.
- Click Done to close the dialog box.
- Open the ZIP file, and then confirm that the data.json file contains model and predictor data for the adaptive models based on the Web Click Through Rate model configuration.
Note: This JSON file can be used for analysis in external tools. Alternatively, you can also store the results of the data flow in a File data set that is configured to be in the repository of your choice.
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?