Creating a Monte Carlo data set
Archived
5 Tasks
35 mins
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
- Log in as Data Scientist with user name DataScientist and password rules.
- In the left navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio.
- In the left navigation pane of Prediction Studio, click Data > Data sets.
- Click New.
- In the New data set window, enter the following information:
- Label: MC Data Generation.
- Type: Monte Carlo.
- Apply To: PegaCRM-Data-Customer.
- Click Create.
2 Use Monte Carlo providers
- In the data set, in the Define fields section, click Add field, and then enter the following information:
- 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.
-
- Method: Monte Carlo
- Value: ConsecutiveIds.nextRowID
- Click Add field, and then enter the following information:
- Field: .Age
- Value: Number.numberBetween(Integer,Integer)
- Argument1: 16
- Argument 2: 94
- Repeat for .CLV_VALUE, Value Number.numberBetween(Integer,Integer)
- Argument1 : 0
- Argument 2: 800
- Repeat for .FirstName, Value Name.firstName
- Repeat for .LastName, Value Name.lastName
3 Populate the Full Name field
- Click Add field.
- Select .Full_Name from the list of properties.
- Select Expression from the list of Methods.
- Enter .FirstName + “ “ + .LastName for the Value. Do not copy-paste.
- Save the data set.
- Click Run.
Note: Ensure that your pop-up blocker is disabled
- To the right of the Run context pane, in the Operation list, select Browse.
- Click Run.
- Examine the records and close the pop-up window.
4 Create a product holdings record for each customer
- In the data set, in the Define groups section, click Add group, and then enter the following information:
- Group: ProductHoldings
- Method: Monte Carlo
- Size: Number.numberBetween(Integer,Integer).
- Argument1: 0
- Argument2: 4
- Add the .CustomerID field using ConsecutiveIds.currentRowID for the Value.
- 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.
- Save the data set.
5 Confirm your results
- Click Run.
- In the Operation list, select Browse.
- Click Run.
- In the pane on the left, expand individual customer records.
- Confirm that generated records match their data set definition.
- Verify that the value for the Customer ID is the same for both the primary and child records.