IDAX.PPV - Calculate the positive predictive value from a confusion matrix

Use this stored procedure to calculate the positive predictive value for a class from a confusion matrix. The positive predictive value is the ratio of the number of records, or correctly classified records, for the specified class divided by the total number of predictions for this class.

Authorization

The privileges held by the authorization ID of the statement must include the IDAX_USER role.

Syntax

IDAX.PPV(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.
Data type: VARCHAR(32672)
The following list shows the parameter values:
matrixTable
Mandatory.
The name of the confusion matrix table.
Data type: VARCHAR(256)
class
Mandatory.
The class in the confusion matrix table for which the positive predictive value is calculated.
Data type: VARCHAR(ANY)

Returned information

Double the positive predictive value as a result set.

Example

CALL IDAX.SPLIT_DATA('intable=samples.customer_churn,traintable=cust_train,testtable=cust_test,id=cust_id,fraction=0.30');
CALL IDAX.GROW_DECTREE('model=cust_dt, intable=cust_train, id=cust_id, target=censor, incolumn=duration:ignore;censor:nom, minsplit=2');
CALL IDAX.PREDICT_DECTREE('model=cust_dt, intable=cust_test, outtable=cust_dt_out');
call IDAX.CONFUSION_MATRIX('intable=cust_test, id=cust_id, target=censor, resulttable=cust_dt_out, matrixtable=cust_dt_cm');
call IDAX.PPV('matrixTable=cust_dt_cm, class=0');