Learn R Programming

fbroc (version 0.3.0)

plot.fbroc.paired.roc: Plots a fbroc.paired.roc object

Description

Plots a fbroc.paired.roc object and shows the two paired ROC curves. The confidence regions for the ROC curves and the performance estimates and confidence bounds for a specified metric can also be included in the plot.

Usage

## S3 method for class 'fbroc.paired.roc':
plot(x, col1 = "blue", fill1 = "dodgerblue",
  col2 = "darkgreen", fill2 = "seagreen1", print.plot = TRUE,
  show.conf = TRUE, conf.level = 0.95, steps = 250, show.metric = NULL,
  ...)

Arguments

x
An object of class fbroc.paired.roc.
col1
Color in which the ROC curve of the first classifier is drawn.
fill1
Fill color for the confidence region of the first ROC curve.
col2
Color in which the ROC curve of the second classifier is drawn.
fill2
Fill color for the confidence region of the second ROC curve.
print.plot
Logical specifying whether the plot should be printed.
show.conf
Logical specifying whether the confidence region should be plotted.
conf.level
Confidence level of the confidence region.
steps
Number of discrete steps for the FPR at which the TPR is calculated. TPR confidence intervals are given for all FPRs in seq(0, 1, by = (1 / steps)). Defaults to 250.
show.metric
Character specifying which metric to display. See perf.fbroc.roc for details. Defaults to NULL, which means that no metric is displayed.
...
further arguments passed to perf.fbroc.paired.roc.

Value

  • A ggplot, so that the user can customize the plot further.

See Also

boot.paired.roc

Examples

Run this code
data(roc.examples)
example <- boot.paired.roc(roc.examples$Cont.Pred, roc.examples$Cont.Pred.Outlier,
                           roc.examples$True.Class, n.boot = 100)
plot(example) # standard plot, no metric shown
plot(example, show.metric = "auc") # Include information about the AUC
plot(example, show.metric = "tpr", fpr = 0.2) # Highlight TPR at an FPR of 20\%

Run the code above in your browser using DataLab