Learn R Programming

rtemis (version 0.79)

mplot3.conf: Plot confusion matrix

Description

Plots confusion matrix and classification metrics

Usage

mplot3.conf(object, main = "auto", xlab = "Reference",
  ylab = "Estimated", plot.metrics = TRUE, mod.name = NULL,
  oma = c(0, 0, 0, 0), main.height = 1, dim.lab = 1, dim.in = 4,
  dim.out = -1, font.in = 2, font.out = 1, cex.main = 1.8,
  cex.in = 1.8, cex.lab = 1.8, cex.lab2 = 1.8, cex.lab3 = 1.5,
  cex.out = 1.4, col.main = "auto", col.lab = "auto",
  col.text.out = "auto", col.bg = "auto", col.bg.out1 = "auto",
  col.bg.out2 = "auto", col.text.hi = "auto", col.text.lo = "auto",
  theme = getOption("rt.theme", "light"), mid.col = "auto",
  hi.color.pos = "#18A3AC", hi.color.neg = "#F48024",
  par.reset = TRUE, pdf.width = 4.5, pdf.height = 4.5,
  filename = NULL, ...)

Arguments

object

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

main

String: Plot title

xlab

String: x-axis label

ylab

String: y-axis label

mod.name

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

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

theme

String: "light", or "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

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

...

Not used

mar

Numeric, vector, length 4: Overall margins

col.bg.out

Color for metrics cells' background

mid.color

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

Value

List of metrics, invisibly