plot.fbroc.paired.roc {fbroc} | R Documentation |
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, show.area = !show.conf, text.size.perf = 6,
...)
Arguments
x |
An object of class |
col1 |
Color in which the ROC curve of the first classifier is drawn. |
fill1 |
Color used for areas (confidence regions, AUCs and partial AUCs) belonging to the first ROC curve. |
col2 |
Color in which the ROC curve of the second classifier is drawn. |
fill2 |
Color used for areas (confidence regions, AUCs and partial AUCs) belonging to 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
|
show.metric |
Character specifying which metric to display. See
|
show.area |
Whether to shade the AUC or partial AUC area. Defaults to !show.conf. |
text.size.perf |
Size of the text display when show.metric is set to |
... |
further arguments passed to |
Value
A ggplot, so that the user can customize the plot further.
See Also
Examples
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 = "auc", show.conf = FALSE) # Show area instead
# Highlight TPR at an FPR of 20%
plot(example, show.metric = "tpr", fpr = 0.2)
plot(example, show.metric = "partial.auc", fpr = c(0.2, 0.4),
show.conf = FALSE, show.partial.auc.warning = FALSE) # Show area