
Last chance! 50% off unlimited learning
Sale ends in
classificatonErrors
builds confusion matrix from manually coded
and predicted gender vectors and returns different
specific classification errors calculated on that matrix.classificatonErrors(labels, predictions)
set.seed(23)
labels = sample(c("female", "male", "unknown", "noname"), 100, replace = TRUE)
predictions = sample(c("female", "male", NA), 100, replace = TRUE)
classificatonErrors(labels, predictions)
Run the code above in your browser using DataLab