mplot3_roc | R Documentation |
mplot3
ROC curvesPlot ROC curve for a binary classifier
mplot3_roc(
prob,
labels,
method = c("pROC", "rt"),
type = "TPR.FPR",
balanced.accuracy = FALSE,
main = "",
col = NULL,
alpha = 1,
cex = 1.2,
lwd = 2.5,
diagonal = TRUE,
diagonal.lwd = 1,
diagonal.lty = 1,
diagonal.col = "red",
group.legend = FALSE,
annotation = TRUE,
annotation.col = col,
annot.line = NULL,
annot.adj = 1,
annot.font = 1,
pty = "s",
mar = c(2.5, 3, 2, 1),
theme = rtTheme,
palette = rtPalette,
verbose = TRUE,
par.reset = TRUE,
filename = NULL,
pdf.width = 5,
pdf.height = 5
)
prob |
Numeric vector or list of numeric vectors [0, 1]: Predicted probabilities (e.g. c(.1, .8, .2, .9)) |
labels |
Integer vector or list of integer vectors 0, 1: True labels (e.g. c(0, 1, 0, 1)) |
method |
Character: "rt" or "pROC" will use rtROC and |
type |
Character: "TPR.FPR" or "Sens.Spec". Only changes the x and y labels. True positive rate vs. False positive rate and Sensitivity vs. Specificity. |
balanced.accuracy |
Logical: If TRUE, annotate the point of maximal Balanced Accuracy. |
main |
Character: Plot title. |
col |
Color, vector: Colors to use for ROC curve(s) |
alpha |
Numeric: Alpha transparency for lines |
cex |
Float: Character expansion factor. |
lwd |
Float: Line width. |
diagonal |
Logical: If TRUE, draw diagonal. |
diagonal.lwd |
Float: Line width for diagonal. |
diagonal.lty |
Integer: Line type for diagonal. |
diagonal.col |
Color: Color for diagonal. |
group.legend |
Logical: If TRUE, print group legend |
annotation |
Character: Add annotation at the bottom right of the plot |
annotation.col |
Color: Color for annotation. |
annot.line |
Numeric: Line position for annotation. |
annot.adj |
Numeric: Text adjustment for annotation. |
annot.font |
Integer: Font for annotation. |
pty |
Character: "s" gives a square plot; "m" gives a plot that fills
graphics device size. Default = "m" (See |
mar |
Float, vector, length 4: Margins; see |
theme |
Character: Run |
palette |
Vector of colors, or Character defining a builtin palette -
get options with |
verbose |
Logical: If TRUE, print messages to console. |
par.reset |
Logical: If TRUE, reset |
filename |
Path to file: If supplied, plot will be printed to file |
pdf.width |
Float: Width in inches for pdf output (if |
pdf.height |
Float: Height in inches for pdf output. |
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.