View source: R/SOptim_PerformanceEval.R
evalPerformanceGeneric | R Documentation |
A single wrapper function used to calculate several performance evaluation metrics both for single- or multi-class problems.
evalPerformanceGeneric(obs, pred, stat, nClassType)
obs |
Integer vector with observed values (class labels). |
pred |
Integer vector with predicted values (class labels) or numeric vector with predicted probabilities. |
stat |
(Character) defining the statistic name ("Kappa", "PSS", "GSS", "AUC" - single-class only or "Accuracy" - multi-class only). |
nClassType |
(Character) defining the type of classification problem, either: "single-class" or "multi-class". |
Numeric with the performance metric value
obs<-sample(1:5, 100, replace = TRUE)
pred<-sample(1:5, 100, replace = TRUE)
evalPerformanceGeneric(obs, pred, stat = "Kappa", nClassType = "multi-class")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.