| calc_auc | R Documentation |
Area Under the ROC Curve calculator
calc_auc(x)
x |
|
calc_auc uses the trapezoidal rule to calculate the area under the ROC curve.
This is a helper function for the gg_roc functions.
AUC. 50% is random guessing, higher is better.
calc_roc gg_roc
plot.gg_roc
##
## Taken from the gg_roc example
rfsrc_iris <- rfsrc(Species ~ ., data = iris)
gg_dta <- gg_roc(rfsrc_iris, which_outcome = 1)
calc_auc(gg_dta)
gg_dta <- gg_roc(rfsrc_iris, which_outcome = 2)
calc_auc(gg_dta)
## randomForest tests
rf_iris <- randomForest::randomForest(Species ~ ., data = iris)
gg_dta <- gg_roc(rfsrc_iris, which_outcome = 2)
calc_auc(gg_dta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.