conf.mat | R Documentation |
Create a Confusion Matrix.
conf.mat(pred, actual, cutoff = NULL, reference = NULL,
proportion = FALSE, dnn = c("Predict", "Actual"), ...)
pred |
a vector of estimated values. |
actual |
a vector of actual values. |
cutoff |
cutoff value for the case that |
reference |
a factor of classes to be used as the true results. |
proportion |
Logical: FALSE (default) for a confusion matrix with number of cases. TRUE, for a confusion matrix with the proportion of cases. |
dnn |
the names to be given to the dimensions in the result (the dimnames names). |
... |
options to be passed to |
the results of table
on pred
and actual
.
Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie
conf.mat.plot
, accuracy
pred = c("no", "yes", "yes", "no", "no", "yes", "no", "no")
actual = c("yes", "no", "yes", "no", "no", "no", "yes", "yes")
conf.mat(pred, actual)
conf.mat(pred, actual, proportion = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.