Creating a Monte Carlo data set record
You must configure each instance of the Monte Carlo data set rule before it can generate the mock data that you need.
-
Define your data set.
-
Select a locale for the records that you want to generate.
Note: The Locale list for the Monte Carlo data set is separate from the Pega Platform locale list that you can access in the Locale Settings tool. When you change a locale in the Monte Carlo data set, you do not change it for the Pega Platform. -
Enter the number of rows that you want to generate in your data set.
-
-
Modify the advanced configuration options.
-
Enter the seed value for the random number generator that is used in the Monte Carlo data set. For example -1.
-
Modify the partition size.
The Monte Carlo data set is split into segments when it is used in distributed runs of data flows. The partition size is the total number of rows that each segment can have. For optimal processing, the number of segments that are created should be bigger than the number of threads on all the Data Flow nodes. For more information, see Configuring the Data Flow service.
-
-
Define fields that will be columns in your data set.
-
Click Add field.
-
In the Field field, enter a property that you want to use as the column. For example .Age.
-
In the Method list, select one of the following options:
Monte Carlo
This option allows you to use providers that generate various kinds of data in the data set.
- In the Value field, select a provider. For example, Number.numberBetween(Integer,Integer).
-
Enter arguments for the providers that require it. For example 18 and 35.
In our example the Number.numberBetween(Integer,Integer) provider generates numbers from the range of 18 to 35 for the .Age column in each row of the Monte Carlo data set.
For more information on the output of each provider, click the Question mark icon.
Expression
This option allows you to use the Expression Builder to build an expression that calculates a value for the property.
- Click on the cog icon and build an expression.
Decision Table
- In the Value field, select an instance of the Decision Table rule that can provide a value for the property.
Decision Tree
- In the Value field, select an instance of the Decision Tree rule that can provide a value for the property.
Map Value
- In the Value field, select an instance of the Map Value rule that can provide a value for the property.
Predictive Model
- In the Value field, select an instance of the Predictive Model rule that can provide a value for the property.
Scorecard
- In the Value field, select an instance of the Scorecard rule that can provide a value for the property.
-
Repeat steps a through c to define more fields.
-
-
Define groups to create lists of properties that are related.
-
Click Add group.
-
In the Group field, enter a Page List property. For example .BankingProducts.
-
Define the number of properties that you want to create in the Page List property.
-
In the Method list select one of the following options:
- Monte Carlo
- Expression
-
For the Monte Carlo option: In the Size field, select one of the providers. For example, Number.numberBetween(Integer,Integer).
-
Enter arguments for the providers that require it. For example 1 and 3.
In our example the Page list can contain one, two, or three properties.
-
-
For the Expression option: Click on the cog icon and build an expression to calculate the size of the group.
-
- Click Add field to define additional properties in each property. Do it similarly to step 4.
-
Repeat steps a through d to define more groups. For example, you can add .Loans, .SavingAccounts, and .CreditCard.
In our example the .BankingProduct Page List might contain the following properties:
-
BankingProducts(1)
- Loans - TRUE
- SavingAccounts - TRUE
- CreditCard - Gold
-
BankingProducts(2)
- Loans - FALSE
- SavingAccounts - TRUE
- CreditCard - Silver
-
BankingProducts(3)
- Loans - FALSE
- SavingAccounts - FALSE
- CreditCard - Bronze
-
BankingProducts(1)
-
-
Click Save.