plot.confusion: Plot method for the confusion matrix

View source: R/evalbin.R

plot.confusionR Documentation

Plot method for the confusion matrix

Description

Plot method for the confusion matrix

Usage

## S3 method for class 'confusion'
plot(
  x,
  vars = c("kappa", "index", "ROME", "AUC"),
  scale_y = TRUE,
  size = 13,
  ...
)

Arguments

x

Return value from confusion

vars

Measures to plot, i.e., one or more of "TP", "FP", "TN", "FN", "total", "TPR", "TNR", "precision", "accuracy", "kappa", "profit", "index", "ROME", "contact", "AUC"

scale_y

Free scale in faceted plot of the confusion matrix (TRUE or FALSE)

size

Font size used

...

further arguments passed to or from other methods

Details

See https://radiant-rstats.github.io/docs/model/evalbin.html for an example in Radiant

See Also

confusion to generate results

summary.confusion to summarize results

Examples

data.frame(buy = dvd$buy, pred1 = runif(20000), pred2 = ifelse(dvd$buy == "yes", 1, 0)) %>%
  confusion(c("pred1", "pred2"), "buy") %>%
  plot()

radiant.model documentation built on Oct. 16, 2023, 9:06 a.m.