The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_statis
Class: none
Declaration: [1] function ExtractClassifPerformance (clix: integer; ConfMat: TIntMatrix; var tp, fp, tn, fn: integer): integer;
[2] function ExtractClassifPerformance (clix: integer; ConfMat: TInt2DArray; var tp, fp, tn, fn: integer): integer;

The function ExtractClassifPerformance extracts for the given class clix the number of true/false positive and true/false negative cases from the multi-class confusion matrix ConfMat. The variable parameters tp, fp, tn and fn return the respective counts.

Please note that the parameter clix has different valid ranges for versions [1] and [2]. In version [1] the valid range is from 1 to ConfMat.NrOfColumns, in version [2] the valid range is from 0 to length(ConfMat)-1.

The function returns the following error codes:

 0... everything is OK
-1 ... matrix ConfMat is not quadratic
-2 ... clix is out of range

Hint: The function ExtractClassifPerformance assumes that the confusion matrix is organized as shown in the figure at right. The true class labels are along the y-axis, the estimated labels are along the x-axis.

Last Update: 2023-Feb-06