Description

The MultiWeightGen Generator allows multiple values to have a weighting to determine how often each value is generated. 


For example, if a valueList contained (economy, mid size, and luxury) and the percentList contained (50, 35, and 15): 

  • economy would be generated 50% of the time
  • mid size would be generated 35% of the time
  • luxury would be generated 15% of the time


Note: It is best to have the percentages add up to 100%; however, the Generator has been designed to allow percentages greater than 100% in rare cases when needed. 


Parameters

The following parameters may be configured for the MultiWeightGen Generator. Items with an asterisk* are required. 

  • valueList - Enter the desired values into the value list. Press ENTER to save each entry in the list. If you need to make changes to your entries, use the navigation commands on the right. Each value entered will be associated to the value in the percentList in the same position.

  • percentList - Enter the desired percentages for the associated values in the valueList into the list. Percentages MUST be integers. Press ENTER to save each entry. If you need to make changes to your entries, use the navigation commands on the right.

  • seed - Using the seed will ensure that the same random data is generated each time data is generated.

  • exactPercentage* - When the exactPercentage is true, the random distribution matches exactly the percentages specified. When exactPercentage is false, the random distribution is determined in real-time and may not match exact percentages. The larger the distribution the more exact the percentage will be. 


Training Video

The following video can be used to see a quick tutorial on how to use the MultiWeightGen Generator: 


How to use the MultiWeightGen Generator

You will need to create an Attribute and assign the MultiWeight Generator to the Attribute. Alternatively, you can simply assign the Generator if the Attribute already exists.


Step 1: Create an Attribute for a selected Domain in your Project
  • Click on the Add Attribute button in the left panel of the Domain Dashboard.



  • Enter a Name for the Attribute and then click the Save button.


Step 2: Assign the MultiWeightGen Generator to the Attribute


You will be taken to the Attribute Dashboard after creating the new Attribute. If possible, a Generator will be automatically assigned to the new Attribute and will need to be removed to assign the MultiWeightGen Generator.


This information can be found at the bottom of the Attribute Dashboard. To reassign the appropriate Generator, complete the following steps: 

  • Click on the Remove Generator button.



  • Click Yes in the confirmation message to remove the currently assigned Generator.

  • Select the MultiWeightGen Generator in the Add a Generator dialog window by clicking on the Plus +.



  • You will now be taken to the Attribute Dashboard and can configure the parameters.


Step 3: Input the Values for your valueList Parameter

Next, you will need to enter each value for the valueList parameter that will be associated with a percentage in the percentList. For this example, we will use these values: 

  • economy
  • mid size
  • luxury


Complete the following steps to add each value:

  • Click on the input field and type in the value.

  • Then press your Enter/Return Key on the keyboard to submit the value.



  • The value will appear to the right of the parameter name, as shown below.

  • Complete these same steps to add the other 2 values for this example: mid size and luxury.



  • The parameter will appear as shown below once all values have been added:


Step 4: Input the values for the perecentList Parameter

Next, you will need to enter each value for the percentList parameter that will be associated with a value in the valueList. For this example, we will use these values: 

  • economy = 50%
  • mid size = 35%
  • luxury = 15%


Complete the following steps to add each value:

  • Click on the input field and type in the value.

  • Then press your Enter/Return Key on the keyboard to submit the value.



  • The value will appear to the right of the parameter name, as shown below.



  • Complete these same steps to add the other 2 percentage values for this example: mid size and luxury.

  • The parameter will appear as shown below once all values have been added:


Step 5: Finish the Generator Configuration

For this example, the seed parameter will be left empty and the exactPercentage parameter will be set to True. This ensures the percentage defined for each value will be matched precisely. Click the Save Generator button to save the configuration.


The data will appear similar to what is shown below. If 100 records are generated, the following percentages exist in the output data: 

  • economy (50 records) = 50%
  • mid size (35 records) = 35%
  • luxury (15 records) = 15%