r confusion matrix code example
Example 1: how to make confusion matrix in r
library(caret)
confusionMatrix(data = your_prediction,
reference = data$y)
Example 2: confusion matrix
A confusion matrix is a table that is often used to describe the performance of a classification model (or “classifier”) on a set of test data for which the true values are known. It allows the visualization of the performance of an algorithm.