conf.mat.plot: Plot Confusion Matrix

View source: R/conf.mat.plot.R

conf.mat.plotR Documentation

Plot Confusion Matrix

Description

Plot a Confusion Matrix.

Usage

conf.mat.plot(pred, actual, cutoff = NULL, reference = NULL, conf.level = 0, 
              margin = 1, color = c("#ff83a8", "#83ff9b"), ...)

Arguments

pred

a vector of estimated values.

actual

a vector of actual values.

cutoff

cutoff value for the case that pred is vector of probabilites.

reference

a factor of classes to be used as the true results.

conf.level

confidence level used for the confidence rings on the odds ratios. Must be a single nonnegative number less than 1; if set to 0 (the default), confidence rings are suppressed.

margin

a numeric vector with the margins to equate. Must be one of 1 (the default), 2, or c(1, 2), which corresponds to standardizing the row, column, or both margins in each 2 by 2 table. Only used if std equals "margins".

color

a vector of length 2 specifying the colors to use for the smaller and larger diagonals of each 2 by 2 table.

...

options to be passed to fourfoldplot.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie

See Also

conf.mat

Examples

pred   = c("no", "yes", "yes", "no", "no", "yes", "no", "no")
actual = c("yes", "no", "yes", "no", "no", "no", "yes", "yes")

conf.mat.plot(pred, actual)

liver documentation built on Oct. 28, 2024, 5:07 p.m.