The Performance Function

This function is called for comparing the observed and inferred outputs for a data sample. It has two main arguments: the output number to be tested, and the data set reference, which can be either a file reference or a pointer on an array. The performance depends on the output classification flag.

The function writes a result file containing an array, with as many lines as there are items in the data set. The number of columns depends on the data file and on the output nature (defuzzification type and classification option).

If the data file has an output column, the FIS performance ith respect to a given data set is estimated by three complementary indices: maximum error, performance index and coverage index (which depends on the blank threshold).


Example:

Figure 6 displays the result file that corresponds to a FIS having conjunctive rules, a 3 MF fuzzy output, and the classification option.
In that case, the file has 9 columns for each example: observed value, inferred value after defuzzification, alarm flag (0 if everything is OK, 3 columns MF1, MF2, MF3 with the example output membership degree to each of them, current error, Bl flag (0 for a non blank example, 1 for a blank example), and cumulated error.

Figure 6: Inference result file - 3 MF fuzzy output, classification option
Image resperfen

General Format

The first line of the result file is a column header. The possible labels are defined in the file fis.h:

WARNING: The cumulated error does not take into account the blank examples.


The first column holds the observed output, if it is available in the data file, as inference can also be done without an observed output.
The second one gives, when the observed output value is available, the difference between observed and inferred values.
A variable number of columns follows, depending on the output nature.


Output Classif Defuzzification Field # Available fields
crisp yes sugeno 4 infered v. Alarm infered class Alarm
crisp no sugeno 2 inferred v. Alarm
crisp   MaxCrisp 2 inferred v. Alarm
fuzzy yes sugeno/area n+2 infered v. Alarm $\mu_1,\mu_2\ldots\mu_n$
fuzzy no sugeno/area 2 infered v. Alarm
fuzzy yes MeanMax n+2 infered v. Alarm $\mu_1,\mu_2\ldots\mu_n$
fuzzy no MeanMax 2 infered v. Alarm


Note: $\mu_1,\mu_2\ldots\mu_n$ are available if the example activates at least one rule. For a fuzzy output defuzzified with sugeno ou area operators, they are equal to the inferred output value membership degrees to MF $1,2\ldots n$. For a fuzzy output defuzzified with a MeanMax operator, or for a crisp output obtained through a MaxCrisp operator, they represent the matching degree of all possible outputs: MF values for a fuzzy output, or real values for a crisp output.

The column Bl is 1 if the item is inactive, 0 otherwise. Finally, the last column gives the current value of the performance index.


Available alarm values:

Integer values which depend on the defuzzification operator:

The performance function also computes the coverage index, which depends on the minimum matching degree given as an argument.


General file format for implicative rules

If the output on which the performance is calculated is implicative, new columns are introduced in the perf file, in the following order.