cal_auc: Area under ROC curve

Description Usage Arguments Details Value References See Also Examples

Description

This function calculates the area under ROC curve

Usage

1
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

cal_confus()

Examples

1
2
3
4
5
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)

WandeRum/multiROC documentation built on May 17, 2019, 6:08 a.m.