Close popover

Table of Contents

Creating a Monte Carlo data set record

Version:

You must configure each instance of the Monte Carlo data set rule before it can generate the mock data that you need.

  1. Create an instance of the Monte Carlo data set rule.

  2. Define your data set.

    • Select a locale for the records that you want to generate.

      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.

  3. 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.

  4. Define fields that will be columns in your data set.

    1. Click Add field.

    2. In the Field field, enter a property that you want to use as the column. For example .Age.

    3. 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.

      1. In the Value field, select a provider. For example, Number.numberBetween(Integer,Integer).
      2. 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.
    4. Repeat steps a through c to define more fields.

  5. Define groups to create lists of properties that are related.

    1. Click Add group.

    2. In the Group field, enter a Page List property. For example .BankingProducts.

    3. Define the number of properties that you want to create in the Page List property.

      1. In the Method list select one of the following options:

        • Monte Carlo
        • Expression
      2. 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.

      3. For the Expression option: Click on the cog icon and build an expression to calculate the size of the group.

    4. Click Add field to define additional properties in each property. Do it similarly to step 4.
    5. 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
  6. Click Save.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.