IDAX.CMATRIX_STATS - Calculate classification quality factors from a confusion matrix
Use this stored procedure to calculate and to show different classification quality factors from a confusion matrix. Classification quality factors are, for example, the true positive rate for each predicted class, the false positive rate for each predicted class, the positive predictive value for each predicted class, the F-measure for each predicted class, correctly and incorrectly classified predictions, prediction accuracy, and weighted prediction accuracy.
Note: This feature is available starting from Db2®
version 11.5.4.
Authorization
The privileges held by the authorization ID of the statement must include the IDAX_USER role.
Syntax
IDAX.CMATRIX_STATS(in parameter_string varchar(32672))
Parameter descriptions
- parameter_string
- Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Returned information
The following result sets:
- TABLE(correct BIGINT, incorrect BIGINT, acc DOUBLE, wacc DOUBLE) for the overall quality factors of the confusion matrix
- TABLE(class VARCHAR(ANY), tpr DOUBLE, fpr DOUBLE, ppv DOUBLE, fmeasure DOUBLE) for each class that is available in the confusion matrix
Example
CALL IDAX.CMATRIX_STATS('matrixTable=ci_income_nb_ewnd_cm');