Next: , Up: Using Probabilities Lists   [Contents][Index]


5.10.1 Defining Probabilities Lists

Probabilities lists are defined in a ‘data’ section of an assembler program.

A definition of probabilities list might contain names of controlled probability variables. Names of such variables can be present in the definition of a probabilities list used in casels instructions, which specify profile probabilities in the state transition matrix, only when the environment state identification engine is represented by a small actor. Names of controlled probability variables can be present in the definition of a probabilities list used in casels instructions, which specify profile probabilities in the action emission matrix, only when the instruction emitting engine is represented by a small actor.

A probabilities list, which contains equal probabilities, can be defined using a ‘probeq’ directive that must be written in one of the following forms:

ls_name         probeq  length
ls_name         probeq  length, fixed_prob
ls_name         probeq  length, var_name

All three forms define a probabilities list named ls_name that contains length elements. The first form defines the probabilities list with all elements equal to 1/(length+1). The second form defines the probabilities list with all elements equal to number fixed_prob, where length*fixed_prob must be less than or equal to 1. Number fixed_prob must be specified either in fixed-point or exponential notation. The third form defines the probabilities list with all elements equal to the value of a probability variable named var_name that must be previously defined using a ‘prob’ directive.

Probability variable var_name might be a controlled or auxiliary probability variable. Expression length*var_name must be less than or equal to 1 for an initial value of probability variable var_name specified in the ‘prob’ directive. If var_name is a controlled probability variable, to which a value is assigned that makes expression length*var_name be greater than 1, then the function qsmm_node_var_realize will raise error QSMM_ERR_PSUMGT1 when trying to update profile probabilities, which correspond to a casels instruction that uses probabilities list ls_name.

A probabilities list, which contains explicitly specified probabilities, can be defined using a ‘probls’ directive that has the following syntax:

ls_name         probls  prob1, prob2, ..., probN

The probabilities list will have name ls_name and contain elements prob1, prob2, ..., probN, where each element can be a number or the name of a probability variable previously defined using a ‘prob’ directive. Numeric elements of probabilities list can be specified either in fixed-point or exponential notation.

The elements list can be split into multiple lines. To indicate that a line of elements list is continued on the next line, terminate a line, which is continued, with a comma after the last element on the line. This is shown in the following example:

ls2             probls  0.04, var1, 0.02, 0.02,
                        0.08, 0.08, var2, var2,
                        var3, 0.06, 0.06, 0.04

The sum of elements of a probabilities list, which contains explicitly specified probabilities, should be less than or equal to 1. If the sum of an element of a probabilities list and elements located earlier in the list exceeds 1, then the element will be discarded when parsing the assembler program. If an element is the name of a probability variable, then for the value of the element there will be taken an initial value of the variable specified in the ‘prob’ directive.

As for the ‘probeq’ directive, probability variables used in arguments of the ‘probls’ directive can be controlled or auxiliary probability variables. If to controlled probability variables, which are used as elements of a probabilities list, there are assigned values that make the sum of all elements of the probabilities list be greater than 1, then the function qsmm_node_var_realize will raise error QSMM_ERR_PSUMGT1 when trying to update profile probabilities, which correspond to a casels instruction that references the probabilities list.


Next: , Up: Using Probabilities Lists   [Contents][Index]