performance_plot: performance_plot

View source: R/performance_plot.R

performance_plotR Documentation

performance_plot

Description

plots binary classification performance metrics

Usage

performance_plot(
  data,
  fitted,
  actual,
  group = NULL,
  facet_x = NULL,
  facet_y = NULL,
  x = "fpr",
  y = "tpr",
  auc = c("title", "group"),
  size_line = 1,
  size = 11,
  env = parent.frame()
)

Arguments

data

A data.frame.

fitted

A character value. Evaluates to a numeric column.

actual

A character value. Evaluates to a logical or binary column.

group

A character value. Evaluates to a column.

facet_x

A character value. Evaluates to a column.

facet_y

A character. Evaluates to a column.

x

ROCR::performance() measure

y

ROCR::performance() measure

auc

character vector indicating which AUC values should be displayed. Options are 'title' and 'group'

size_line

width of line for geom_line(). Default is 1.

size

theme size for use_theme(). Default is 14.

env

environment for evaluating expressions.

Examples

performance_plot(mtcars, "-disp", "am")
performance_plot(mtcars, "-disp", "am", "cyl")
performance_plot(mtcars, "-disp", "am", "cyl", x = "rec", y = "prec")
performance_plot(mtcars, "-disp", "am", x = "rpp", y = "gain")
performance_plot(mtcars, "-disp", "am", x = "rpp", y = "lift")
performance_plot(mtcars, "-disp", "am", x = "cutoff", y = "tpr")

ezplot documentation built on Aug. 12, 2022, 1:07 a.m.