| hanaml.Auc {hana.ml.r} | R Documentation |
hanaml.Auc is a R wrapper for PAL Auc.
hanaml.Auc(conn.context, data,
key = NULL, positive.label = NULL)
conn.context |
|
data |
|
key |
|
positive.label |
: |
R6Class object.
Area under curve (AUC) is a traditional method to evaluate the performance of classification algorithms. Basically, it can evaluate binary classifiers, but it can also be extended to multiple-class condition easily.
Return an "Auc" object with following values:
auc : double
The area under the receiver operating
characteristic curve.
roc : DataFrame
False positive rate and true positive rate,
structured as follows:
ID, INTEGER - column with index
FPR, DOUBLE -
representing false positive rate.
TPR, DOUBLE -
representing true positive rate.
## Not run:
Input DataFrame data:
data$Collect()
ID ORIGINAL PREDICT
0 1 0 0.07
1 2 0 0.01
2 3 0 0.85
3 4 0 0.30
4 5 0 0.50
5 6 1 0.50
6 7 1 0.20
7 8 1 0.80
8 9 1 0.20
9 10 1 0.95
Compute Area Under Curve:
> auc_fit <- hanaml.Auc(conn.context = conn, data = data)
Output:
> auc_fit$auc
0.66
> auc_fit$roc$Collect()
ID FPR TPR
0 0 1.0 1.0
1 1 0.8 1.0
2 2 0.6 1.0
3 3 0.6 0.6
4 4 0.4 0.6
5 5 0.2 0.4
6 6 0.2 0.2
7 7 0.0 0.2
8 8 0.0 0.0
## End(Not run)