confusion.matrix | R Documentation |
Create a confusion matrix for any multiclass set of predicted vs observed labels in a classification problem.
confusion.matrix(actual, predicted)
actual |
dataframe. Original labels. |
predicted |
dataframe. Predicted labels. |
data.frame. Predicted labels (rows) x Observed labels (cols).
x = c("FALSE", "TRUE", "FALSE", "TRUE", "TRUE")
y = c("TRUE", "TRUE", "TRUE", "TRUE", "TRUE")
confusion.matrix(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.