IDAX.WACC - Calculate the weighted classification accuracy

Use this stored procedure to calculate the weighted ratio of correctly classified predictions among the total number of predictions. For the calculation of the ratio, each class has the same weight, irrespective of its real frequency in the input data. This approach is useful when classes are not equally frequent.

Authorization

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

Syntax

IDAX.WACC(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:
intable
Mandatory.
The name of the input table that contains the real values.
Data type: VARCHAR(256)
target
Mandatory.
The column of the input table that contains the real values.
Data type: VARCHAR(128)
id
Mandatory.
The column of the input table that identifies a unique instance ID.
Data type: VARCHAR(128)
resulttable
Mandatory.
The name of the input table that contains the predicted values.
Data type: VARCHAR(256)
resulttarget
Optional.
The column of the input table that contains the predicted values.
Default: "CLASS"
Data type: VARCHAR(128)
resultid
Optional.
The column of the input table that identifies a unique instance ID.
Default: "ID"
Data type: VARCHAR(128)

Returned information

Double the weighted classification accuracy 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.WACC('intable=cust_test, id=cust_id, target=censor, resulttable=cust_dt_out');