Creating parameterized predictors
3 Tasks
15 mins
Scenario
U+ Bank is implementing cross-sell of their credit cards on the web by using Pega Customer Decision Hub™. All available customer data, including financial clickstream summary attributes, is available to the adaptive models that determine which offer to display for a particular customer.
To further enhance the predictive power of the adaptive models, you create two parameterized predictors.
The first predictor is the ratio of two clickstream summary attributes that denote the number of visits to the website's Investment page in the last 30 days and the last 90 days.
The second predictor is the on-the-fly score of a predictive model running in Customer Decision Hub that calculates churn risk.
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: Verify that customer behavioral data is collected
Simulate customer interactions on the U+ Bank website. Browse the FSClickstream data set and confirm that customer activity on the website is captured.
Task 2: Create a parameterized predictor using customer behavior data
Create a parameterized predictor that calculates the ratio of the two clickstream summary attributes that denote the number of visits to the website's Investment page in the last 30 days and the last 90 days. In the WebTreatmentModelImpl strategy, configure the adaptive model component with the new parameterized predictor.
Task 3: Create a parameterized predictor that leverages the outcome of the Churn model
In the WebTreatmentModelImpl strategy, create a sub strategy that references the Churn model. Configure the adaptive model component with the new parameterized predictor.
Challenge Walkthrough
Detailed Tasks
1 Verify that customer behavioral data is collected
- On the exercise system landing page, click U+ Bank to launch the U+ Bank website.
- On the U+ Bank website, in the upper-right corner, click Log in to access the site as Troy and display the marketing banner.
- In the header of the U+ Bank website, click Investment to see the Investment landing page.
- In the upper right, click the user image, then click Log out.
- Repeat steps 2-4 at least once.
- On the exercise system landing page, click Pega CRM suite to log in to Customer Decision Hub.
- Log in as a data scientist with User name DataScientist using Password rules.
- In the header of Customer Decision Hub, in the Search field, enter FSClickstream, and then press the Enter key.
- In the list of results, click the data set FSClickstream to open the data set in Prediction Studio.
- In Prediction Studio, in the upper right, click Run to open the run context of the data set.
- In the run context, in the Operation list, select Browse.
- In the upper right of the run context, click Run.
Notice that many attributes now have a value for Troy (Customer ID = 14), including those concerning visits to the Investment page.
2 Create a parameterized predictor using customer behavioral data
- In the navigation pane of Prediction Studio, click Predictions to view the list of predictions.
- On the Predict Web Propensity tile, click Open prediction to configure the prediction.
- In the upper-right corner of the Prediction workspace, click Actions > Open strategy to open the strategy canvas.
- Right-click the Web Treatment Model Impl component, and then select Open Strategy to configure the component.
- In the upper right, click Check out to check out the strategy for editing.
- On the strategy canvas, minimize, and then maximize the Customers area and arrange the strategy components.
- Right-click the adaptive model component and select Open Adaptive Model to open the adaptive model rule instance.
- In the adaptive model rule instance, click the Predictors tab.
- On the Predictors tab, click the Parameters tab, and then click Add parameter.
- In the Name field, enter RatioInverstmentPageVisits30to90.
- In the Data type list, select Double.
- Confirm that the predictor type is Numeric.
- In the upper right, click Save to save the new parameter.
- In the lower left, click Back to Customer Decision Hub.
- On the strategy canvas, right-click the adaptive model component, and then select Properties to open the Adaptive model properties dialog box.
- In the Adaptive model properties dialog box, in the Parameterized predictors section, click the Gear icon for the RatioInverstmentPageVisits30to90 predictor to open the expression builder.
- In the expression builder, enter the following expression:
IF(Primary.Customer.FSClickstream.InvestmentPageVisitsLast90Days=0,0,
divide(Primary.Customer.FSClickstream.InvestmentPageVisitsLast30Days,Primary.Customer.FSClickstream.InvestmentPageVisitsLast90Days))
- Click the Test tab.
- In the Test data section, enter values for the two variables, and then click outside the value fields to see the result.
- Click Submit to close the expression builder.
- Click Submit to close the Adaptive model properties dialog box.
3 Create a parameterized predictor that leverages the outcome of the Churn model
- On the strategy canvas, in the Customers area, click + > Sub strategy > External to add a sub strategy component to the canvas.
- Reconnect the strategy components so that the sub strategy component is connected to the external input and the adaptive model component as shown in the following image.
- Right-click the sub strategy component, and then select Properties to open the External strategy properties dialog box.
- In the Name field, enter Churn Risk.
- On the External strategy tab, click Another page to run the strategy on a defined page.
- In the Page field, enter Customer.
- In the External strategy field, enter ChurnRisk.
- Next to the External strategy field, click the Target icon.
- In the upper right, click Create and open to create the strategy.
- On the strategy canvas, right-click, and then select Enable external input to add the input component to the canvas.
- On the strategy canvas, right-click, and then select Decision analytics > Predictive model to add a predictive model component to the canvas.
- Connect the external input to the predictive model component and the predictive model component to the results as shown in the following image.
- Right-click the predictive model component and select Properties to open the Predictive model properties dialog box.
- In the Predictive model properties dialog box, in the Predictive model field, press the Down arrow key, and then double-click Churn to select the model and auto populate the Name field.
- Click the Output mapping tab, and then select Add item.
- In the Target field, enter ChurnRisk.
- In the Source (Churn) list, select Score.
- Next to the Target field, click the Target icon to open the Property Record Configuration landing page.
- In the upper right, click Create and open to edit the property.
- In the Property type section, click change.
- In the Single Value column, select Double.
- In the upper right, click Save.
- Close the ChurnRisk property.
- Click Submit to close the Predictive model properties dialog box.
- In the upper-right corner of the strategy canvas, click Save.
- Close the strategy canvas.
- Click Submit to close the External strategy properties dialog box.
- On the strategy canvas, right-click the adaptive model component, and then select Open Adaptive Model to open the adaptive model rule instance.
- In adaptive model rule instance, click the Predictors tab
- On the Predictors tab, click the Parameters tab, and then click Add parameter.
- In the lower left, click Back to Customer Decision Hub.
- On the strategy canvas, right-click the adaptive model component, and then select Properties to open the Adaptive model properties dialog box.
- In the Parameterized predictors section, in the ChurnRisk field, enter .ChurnRisk.
- Click Submit.
- In the upper right, check in the strategy with appropriate comments.
Want to help us improve this content?