Learn R Programming

ggRandomForests (version 1.0.0)

calc_auc: Internal calculator for the Area Under the ROC Curve

Description

Internal calculator for the Area Under the ROC Curve

Usage

calc_auc(x)

Arguments

x
output from calc_roc (or gg_roc)

Value

  • AUC. 50% is random guessing, higher is better.

Details

calc_auc uses the trapezoidal rule to calculate the area under the ROC curve.

This is a helper function for the gg_roc functions, and not intended for use by the end user.

See Also

calc_roc gg_roc plot.gg_roc

Examples

Run this code
##
## Taken from the gg_roc example
iris.obj <- rfsrc(Species ~ ., data = iris)
roc <- ggRandomForests:::calc_roc.rfsrc(iris.obj, iris.obj$yvar, which.outcome=2, oob=TRUE)
ggRandomForests:::calc_auc(roc)

Run the code above in your browser using DataLab