cal_auc: Area under ROC curve

Description Usage Arguments Details Value References See Also Examples

View source: R/cal_auc.R

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)

Example output



multiROC documentation built on May 1, 2019, 10:11 p.m.

Related to cal_auc in multiROC...