cal_auc {multiROC} | R Documentation |
Area under ROC curve
Description
This function calculates the area under ROC curve
Usage
cal_auc(X, Y)
Arguments
X |
A vector of true positive rate |
Y |
A vector of false positive rate, same length with TPR |
Details
This function calculates the area under ROC curve.
Value
A numeric value of AUC will be returned.
References
https://www.r-bloggers.com/calculating-auc-the-area-under-a-roc-curve/
See Also
Examples
data(test_data)
true_vec <- test_data[, 1]
pred_vec <- test_data[, 5]
confus_res <- cal_confus(true_vec, pred_vec)
AUC_res <- cal_auc(confus_res$TPR, confus_res$FPR)
[Package multiROC version 1.1.1 Index]