Skip to main content

Creating a Monte Carlo data set

Archived

5 Tasks

35 mins

Pega Customer Decision Hub 8.4
Visible to: All users
Beginner Pega Customer Decision Hub 8.4 English
This content is now archived and is no longer updated. Progress is not calculated. Pega Cloud instances are disabled, and badges are no longer awarded.

Scenario

MyCo, a large telecom provider, is considering using Pega Customer Decision Hub™ for their marketing strategy. As a data scientist, you are asked to give a demonstration of self-learning adaptive models. As Myco’s customer data are currently unavailable to you, you create a mock customer data set using the Monte Carlo method.

Use the following credentials to log in to the exercise system:

Role Username Password
Data Scientist DataScientist rules

Your assignment consists of the following tasks:

Task 1: Create a Monte Carlo data set

Create a new Monte Carlo data set based on PegaCRM-Data-Customer class.

Task 2: Use Monte Carlo providers

Use different Monte Carlo providers to generate mock data.

Provider Field Range
Customer ID (unique identifier) .CustomerID  
Age .Age 16 to 94
CLV Value .CLV_VALUE 0 to 800
First Name .FirstName  
Last Name .LastName  

Task 3: Populate the Full Name field

Populate the Full Name field (.Full_Name) by using the customer first name and last name as input. Execute the data set and examine the results.

Task 4. Create a product holdings record for each customer

Create a Product Holdings group and ensure that there are up to four records per customer. The Product ID should be one of the following names: Broadband, Phone Line, WiFi, High Speed Line.

Task 5: Confirm your results

Execute the data set and examine the results.

Challenge Walkthrough

Detailed Tasks

1 Create a Monte Carlo data set

  1. Log in as Data Scientist with user name DataScientist and password rules.
  2. In the left navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio.
  3. In the left navigation pane of Prediction Studio, click Data > Data sets.
    Data sets
  4. Click New.
  5. In the New data set window, enter the following information:
    1. Label: MC Data Generation.
    2. Type: Monte Carlo.
    3. Apply To: PegaCRM-Data-Customer.
  6. Click Create.

2 Use Monte Carlo providers

  1.  In the data set, in the Define fields section, click Add field, and then enter the following information:
    1. Field: .CustomerID
Note: CustomerID belongs to the parent class PegaMKT-Data-Customer. Click the down arrow to display the list of fields. Scroll down the list and double-click More.. to access the parent class.
    1. Method: Monte Carlo
    2. Value: ConsecutiveIds.nextRowID
  1. Click Add field, and then enter the following information:
    1. Field: .Age
    2. Value: Number.numberBetween(Integer,Integer)
    3. Argument1: 16
    4. Argument 2: 94
  2. Repeat for .CLV_VALUE, Value Number.numberBetween(Integer,Integer)
    1. Argument1 : 0
    2. Argument 2: 800
  3. Repeat for .FirstName, Value Name.firstName
  4. Repeat for .LastName, Value Name.lastName
    Fields

 

3 Populate the Full Name field

  1.  Click Add field.
  2. Select .Full_Name from the list of properties.
  3. Select Expression from the list of Methods.
  4. Enter .FirstName + “ “ + .LastName for the Value. Do not copy-paste.
  5. Save the data set.
  6. Click Run.
Note: Ensure that your pop-up blocker is disabled
  1. To the right of the Run context pane, in the Operation list, select Browse.
  2. Click Run.
  3. Examine the records and close the pop-up window.
    Record 1

 

4 Create a product holdings record for each customer

  1. In the data set, in the Define groups section, click Add group, and then enter the following information:
    1. Group: ProductHoldings
    2. Method: Monte Carlo
    3. Size: Number.numberBetween(Integer,Integer).
    4. Argument1: 0
    5. Argument2: 4
  2. Add the .CustomerID field using ConsecutiveIds.currentRowID for the Value.
  3. Add the .ProductID field using Options.options(Text,Text,Text,Text) for the Value. Use Broadband, Phone Line, WiFi, and High Speed Line for the arguments.
  4. Save the data set.

5 Confirm your results

  1. Click Run.
  2. In the Operation list, select Browse.
  3. Click Run.
  4. In the pane on the left, expand individual customer records.
  5. Confirm that generated records match their data set definition.
  6. Verify that the value for the Customer ID is the same for both the primary and child records.
Record 2


Available in the following mission:

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