Weighted List

Welcome to the documentation of the weight list generation rule which is probably one of the most popular and important generation rule available in GEDIS Studio.
Configuration
As you are concerned with the realism of the test data you must fully understand the basics of values frequency control and the several features provided by the Weighted List rule to achieve this control.
Basicaly, the configuration of this rule is quite simple. You have to provide a sequence of values and for each value a weight. The weights will be used inform the generation engine on the expected frequency of the associated values in the generated data.
You can put only once a same value in the list and the associated weights must be a number greater than zero. Keep these constraints in mind especially if you plan to use parameters for values or weights.
There's an important point regarding frequency control. To have an effective distribution of the values that matches your configuration you must produce a sufficient number of values. For example, it doesn't make sense to expect a uniform distribution between a thousand of values if you generate only a hundred of those values.
There are two other parameters made available to control how values are selected during the generation of your testdata. The first is the type of selection and you can chose among sequence or random; and the second is a flag to activate or not the interpretation of generated values. We will see more about this later.
A Simple Default Configuration
Let's start with a simple case and consider you have a list of colors you want to choose from such as: blue, red, white, yellow and black. Notice that when adding a new value in the list, GEDIS Studio choses a default weight of 1 and provides a normalized frequency in term of percentage.
With this default configuration each value in the list will have the same chance to be selected. Assuming the default random selection type, you don't have any control on the order in which values will be selected in the list.
As we mentioned it before, the only expectation you can have with this configuration is that if you generate enough values, the frequency of each value will match the weight you provided for that value.
Using the Sequence Selection Type
Using the same configuration, you can use the selection type option and modify the way values are generated. Indeed, in the previous example the default selection type was assumed (that is the random one).
By selecting the sequence selection type you ask the generation engine to produce values in the order of appearance in the configuration list. The weight of a value is used to control the number of successive occurrences of the value.
For example, you change the previous configuration with new weights such as 1 for blue, 2 for red, 3 for white and so on. In that case, the generated values will look like the sequence:
blue, red, red, white, white, white, etc.



