Skip to main content

Creating parameterized predictors

3 Tasks

15 mins

Pega Customer Decision Hub 8.6
Visible to: All users Applies to: Pega Customer Decision Hub 8.6
Beginner
English

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.

Tip: The applicable clickstream summary attributes are InvestmentPageVisitsLast90Days and InvestmentPageVisitsLast90Days.

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.

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 Verify that customer behavioral data is collected

  1. On the exercise system landing page, click U+ Bank to launch the U+ Bank website.
    UBank
  2. On the U+ Bank website, in the upper-right corner, click Log in to access the site as Troy and display the marketing banner.
  3. In the header of the U+ Bank website, click Investment to see the Investment landing page.
  4. In the upper right, click the user image, then click Log out.
    Logout
  5. Repeat steps 2-4 at least once.
Tip: To generate more customer behavior data, you could click on the credit card offer or visit other pages on the website.
  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 with User name DataScientist using Password rules.
  3. In the header of Customer Decision Hub, in the Search field, enter FSClickstream, and then press the Enter key.
  4. In the list of results, click the data set FSClickstream to open the data set in Prediction Studio.
    Data set
  5. In Prediction Studio, in the upper right, click Run to open the run context of the data set.
  6. In the run context, in the Operation list, select Browse.
  7. 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.

Values for Troy

 

2 Create a parameterized predictor using customer behavioral data

  1. In the navigation pane of Prediction Studio, click Predictions to view the list of predictions.
  2. On the Predict Web Propensity tile, click Open prediction to configure the prediction.
  3. In the upper-right corner of the Prediction workspace, click Actions > Open strategy to open the strategy canvas.
    Open strategy
  4. Right-click the Web Treatment Model Impl component, and then select Open Strategy to configure the component.
    Open sub strategy
  5. In the upper right, click Check out to check out the strategy for editing.
  6. On the strategy canvas, minimize, and then maximize the Customers area and arrange the strategy components.
    Customers area
  7. Right-click the adaptive model component and select Open Adaptive Model to open the adaptive model rule instance.
  8. In the adaptive model rule instance, click the Predictors tab.
  9. On the Predictors tab, click the Parameters tab, and then click Add parameter.
    Parameters
  10. In the Name field, enter RatioInverstmentPageVisits30to90.
  11. In the Data type list, select Double.
  12. Confirm that the predictor type is Numeric.
    New parameter
  13. In the upper right, click Save to save the new parameter.
  14. In the lower left, click Back to Customer Decision Hub.
  15. On the strategy canvas, right-click the adaptive model component, and then select Properties to open the Adaptive model properties dialog box.
  16. 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.
    Gear icon
  17. In the expression builder, enter the following expression:
    IF(Primary.Customer.FSClickstream.InvestmentPageVisitsLast90Days=0,0, 
    divide(Primary.Customer.FSClickstream.InvestmentPageVisitsLast30Days,Primary.Customer.FSClickstream.InvestmentPageVisitsLast90Days))
Tip: This expression returns a value of zero when the number of Investment page visits in the last 90 days is zero. Otherwise, it returns the ratio of the Investment page visits in the last 30 days to the last 90 days.
  1. Click the Test tab.
  2. In the Test data section, enter values for the two variables, and then click outside the value fields to see the result.
    Formula
  3. Click Submit to close the expression builder.
  4. Click Submit to close the Adaptive model properties dialog box.

3 Create a parameterized predictor that leverages the outcome of the Churn model

  1. On the strategy canvas, in the Customers area, click + > Sub strategy > External to add a sub strategy component to the canvas.
    External strategy
  2. 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.
    Sub strategy component
  3. Right-click the sub strategy component, and then select Properties to open the External strategy properties dialog box.
  4. In the Name field, enter Churn Risk.
  5. On the External strategy tab, click Another page to run the strategy on a defined page.
  6. In the Page field, enter Customer.
  7. In the External strategy field, enter ChurnRisk.
  8. Next to the External strategy field, click the Target icon.
    Target icon
  9. In the upper right, click Create and open to create the strategy.
    1. On the strategy canvas, right-click, and then select Enable external input to add the input component to the canvas.
    2. On the strategy canvas, right-click, and then select Decision analytics > Predictive model to add a predictive model component to the canvas.
    3. Connect the external input to the predictive model component and the predictive model component to the results as shown in the following image.
      Add predictive model
    4. Right-click the predictive model component and select Properties to open the Predictive model properties dialog box.
    5. 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.
    6. Click the Output mapping tab, and then select Add item.
    7. In the Target field, enter ChurnRisk.
    8. In the Source (Churn) list, select Score.
    9. Next to the Target field, click the Target icon to open the Property Record Configuration landing page.
    10. In the upper right, click Create and open to edit the property.
    11. In the Property type section, click change.
    12. In the Single Value column, select Double.
    13. In the upper right, click Save.
  10. Close the ChurnRisk property.
    Model properties
  11. Click Submit to close the Predictive model properties dialog box.
  12. In the upper-right corner of the strategy canvas, click Save.
  13. Close the strategy canvas.
  14. Click Submit to close the External strategy properties dialog box.
  15. On the strategy canvas, right-click the adaptive model component, and then select Open Adaptive Model to open the adaptive model rule instance.
  16. In adaptive model rule instance, click the Predictors tab
  17. On the Predictors tab, click the Parameters tab, and then click Add parameter.
    1. In the Name field, enter ChurnRisk.
    2. In the Data type list, select Double.
    3. Confirm that the predictor type is Numeric.
    4. In the upper right, click Save.
  18. In the lower left, click Back to Customer Decision Hub.
  19. On the strategy canvas, right-click the adaptive model component, and then select Properties to open the Adaptive model properties dialog box.
  20. In the Parameterized predictors section, in the ChurnRisk field, enter .ChurnRisk.
    ChurnRisk
  21. Click Submit.
  22. In the upper right, check in the strategy with appropriate comments.


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