Learn R Programming

rtemis (version 0.79)

mplot3.roc: mplot3 ROC curves

Description

Plot ROC curve for a binary classifier

Usage

mplot3.roc(prob, labels, method = c("rt", "pROC"), type = "TPR.FPR",
  balanced.accuracy = FALSE, main = "", col = ucsfPalette,
  cex = 1.2, lwd = 2.5, diagonal = TRUE, diagonal.lwd = 2.5,
  diagonal.lty = 1, group.legend = FALSE, annotation = TRUE,
  annotation.col = col, annot.line = NULL, annot.adj = 1,
  annot.font = 1, mar = c(2.5, 3, 2.5, 1),
  theme = getOption("rt.theme", "lightgrid"), par.reset = TRUE,
  filename = NULL, pdf.width = 5, pdf.height = 5, ...)

Arguments

prob

Vector, Float [0, 1]: Predicted probabilities (i.e. c(.1, .8, .2, .9))

labels

Vector, Integer 0, 1: True labels (i.e. c(0, 1, 0, 1))

method

String: "rt" or "pROC" will use rtROC and pROC::roc respectively to get points of the ROC. Default = "rt"

type

String: "TPR.FPR" or "Sens.Spec". Only changes the x and y labels. True positive rate vs. False positive rate and Sensitivity vs. Specificity. Default = "TPR.FPR"

balanced.accuracy

Logical: If TRUE, annotate the point of maximal Balanced Accuracy. Default = FALSE

main

String: Plot title. Default = ""

col

Color, vector: Colors to use for ROC curve(s)

cex

Float: Character expansion factor. Default = 1.2

lwd

Float: Line width. Default = 2.5

diagonal

Logical: If TRUE, draw diagonal. Default = TRUE

diagonal.lwd

Float: Line width for diagonal. Default = 2.5

diagonal.lty

Integer: Line type for diagonal. Default = 1

group.legend

Logical

...

Additional parameters to pass to mplot3.xy