Learn R Programming

fbroc (version 0.2.0)

perf.roc: Calculate performance for bootstrapped ROC curve

Description

Calculates different performance metric for ROC curves based on the bootstrap results saved in an object of class fbroc.roc. Confidence intervals are included.

Usage

perf.roc(roc, metric = "auc", conf.level = 0.95, tpr = NULL, fpr = NULL)

Arguments

roc
An object of class fbroc.roc.
metric
A performance metric. Select "auc" for the AUC, "tpr" for the TPR at a fixed FPR and "fpr" for the FPR at a fixed TPR.
conf.level
The confidence level of the confidence interval.
tpr
The fixed TPR at which the FPR is to be evaluated when fpr is selected as metric.
fpr
The fixed FPR at which the TPR is to be evaluated when tpr is selected as metric.

Value

  • A list of class fbroc.perf, containing the elements:
  • Observed.PerformanceThe observed performance.
  • CI.PerformanceQuantile based confidence interval for the performance.
  • conf.levelConfidence level of the confidence interval.
  • metricUsed performance metric.
  • paramsParameters used to further specifiy metric, e.g. fixed TPR.
  • n.bootNumber of bootstrap replicates used.
  • boot.resultsPerformance in each bootstrap replicate.

See Also

boot.roc, print.fbroc.perf, plot.fbroc.perf

Examples

Run this code
y <- rep(c(TRUE, FALSE), each = 500)
x <- rnorm(1000) + y
result.boot <- boot.roc(x, y, n.boot = 100)
perf.roc(result.boot, "auc")
perf.roc(result.boot, "auc", conf.level = 0.99)

Run the code above in your browser using DataLab