Plot a Confusion Matrix.
conf.mat.plot(pred, actual, cutoff = NULL, reference = NULL, conf.level = 0,
margin = 1, color = c("#ff83a8", "#83ff9b"), ...)
a vector of estimated values.
a vector of actual values.
cutoff value for the case that pred
is vector of probabilites.
a factor of classes to be used as the true results.
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.
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".
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
.
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
conf.mat
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)
Run the code above in your browser using DataLab