mplot3_pr: 'mplot3' Precision Recall curves

View source: R/mplot3_pr.R

mplot3_prR Documentation

mplot3 Precision Recall curves

Description

Plot Precision Recall curve for a binary classifier

Usage

mplot3_pr(
  prob,
  labels,
  f1 = FALSE,
  main = "",
  col = NULL,
  cex = 1.2,
  lwd = 2.5,
  diagonal = FALSE,
  hline.lty = 1,
  hline.lwd = 1,
  hline.col = "red",
  diagonal.lwd = 2.5,
  diagonal.lty = 3,
  group.legend = FALSE,
  annotation = TRUE,
  annotation.side = 3,
  annotation.col = col,
  annot.line = NULL,
  annot.adj = 1,
  annot.font = 1,
  mar = c(2.5, 3, 2.5, 1),
  theme = rtTheme,
  palette = rtPalette,
  par.reset = TRUE,
  verbose = 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))

f1

Logical: If TRUE, annotate the point of maximal F1 score.

main

Character: Plot title.

col

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

cex

Float: Character expansion factor.

lwd

Float: Line width.

diagonal

Logical: If TRUE, draw diagonal.

hline.lty

Integer: Line type for horizontal line(s)

hline.lwd

Float: Width for horizontal line(s)

hline.col

Color for horizontal line(s)

diagonal.lwd

Float: Line width for diagonal.

diagonal.lty

Integer: Line type for diagonal.

group.legend

Logical

annotation

Character: Add annotation at the bottom right of the plot

annotation.side

Integer: Side of plot to place annotation.

annotation.col

Color: Color of annotation.

annot.line

Numeric: Line number for annotation.

annot.adj

Numeric: Adjustment for annotation.

annot.font

Integer: Font for annotation.

mar

Float, vector, length 4: Margins; see par("mar")

theme

Character: Run themes() for available themes

palette

Vector of colors, or Character defining a builtin palette - get options with rtpalette()

par.reset

Logical: If TRUE, reset par setting before exiting.

verbose

Logical: If TRUE, print messages to console.

filename

Path to file: If supplied, plot will be printed to file

pdf.width

Float: Width in inches for pdf output (if filename is set).

pdf.height

Float: Height in inches for pdf output.

Value

List with Precision, Recall, and Threshold values, invisibly

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on April 24, 2024, 6:58 p.m.