View source: R/SOptim_PerformanceEval.R
generateConfusionMatrix | R Documentation |
A function used to generate a confusion matrix for classification evaluation.
generateConfusionMatrix(obs, pred)
obs |
A factor or integer vector with observed values (class labels). |
pred |
A factor or integer vector with predicted values (class labels). |
A matrix object with columns correspoding to observed and rows to predicted values/classes.
obs <- sample(0:1, 20, replace = TRUE)
pred <- sample(0:1, 20, replace = TRUE)
generateConfusionMatrix(obs, pred)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.