mplot3_confbin: Plot extended confusion matrix for binary classification

View source: R/mplot3_confbin.R

mplot3_confbinR Documentation

Plot extended confusion matrix for binary classification

Description

Plots an extended confusion matrix using mplot3_img

Usage

mplot3_confbin(
  object,
  main = NULL,
  xlab = "True",
  ylab = "Estimated",
  mod.name = NULL,
  mar = c(4, 5, 4, 3),
  dim.lab = 1,
  dim.in = 4,
  dim.out = 2,
  font.in = 2,
  font.out = 2,
  cex.in = 1.2,
  cex.lab = 1.2,
  cex.lab2 = 1,
  cex.out = 1,
  col.text.out = "white",
  col.bg.out = "gray50",
  theme = "light",
  mid.color = NULL,
  hi.color.pos = "#18A3AC",
  hi.color.neg = "#716FB2",
  par.reset = TRUE,
  pdf.width = 8.7,
  pdf.height = 8.7,
  filename = NULL,
  ...
)

Arguments

object

Either 1. a classification rtMod, b. a caret::confusionMatrix object, or c. a matrix / data.frame / table

main

Character: Plot title

xlab

Character: x-axis label

ylab

Character: y-axis label

mod.name

Character: Name of the algorithm used to make predictions. If NULL, will look for object$mod.name. Default = NULL

mar

Numeric, vector, length 4: Overall margins

dim.lab

Float: Height for labels

dim.in

Float: Width and height for confusion matrix cells

dim.out

Float: Height for metrics cells

font.in

Integer: The font parameter for confusion matrix cells

font.out

Integer: The font parameter for metrics cells

cex.in

Float: The cex parameter for confusion matrix cells

cex.lab

Float: The cex parameter for first line of label cells

cex.lab2

Float: The cex parameter for second line of label cells

cex.out

Float: The cex parameter for metrics cells

col.text.out

Color for metrics cells' text

col.bg.out

Color for metrics cells' background

theme

Character: "light", or "dark"

mid.color

Color: The mid color for the confusion matrix. Default = "white" for theme = "light", "black" for "dark"

hi.color.pos

Color: The hi color for correct classification.

hi.color.neg

Color: The hi color for missclassification

par.reset

Logical: If TRUE, reset par before exit. Default = TRUE

pdf.width

Float: PDF width, if filename is set

pdf.height

Float: PDF height, if filename is set

filename

Character: If specified, save plot to this path. Default = NULL

...

Not used

Value

List of metrics, invisibly

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Nov. 22, 2024, 4:12 a.m.