The roc function calculates a performance indicator, the AUC, that is the area under the curve defined by the column and the attclass.
The default value for the class attribute (if more than two values are present) can be specified as the optional parameter defclass. All computation can be performed according to the groups defined in the group parameter.
The AUC value ranges from 0 to +1, where:
0 indicates the worst performance indicator, and
+1 indicates the best performance indicator.
Function and parameters
roc(column, attclass, defclass, group)
It identifies the column to which you want to apply the formula. The column parameter is mandatory.
It identifies the column to which you want to apply the formula. It is a nominal attribute. The attclass parameter is mandatory.
It is the default value for the class attribute.
It allows you to group the results by a certain column.
It defines the importance of a certain attribute.
The following example uses the Bike Sales dataset.