Calculate confusion matrices (or matrix) for validation datasets.
Source:R/metapredict_confusion.R
calcConfusionValidation.Rd
Calculate confusion matrices based on predictions for validation datasets.
Usage
calcConfusionValidation(
predsList,
lambda,
sampleMetadata,
className = "class",
classLevels = NA,
each = TRUE
)
Arguments
- predsList
list of predictions from
metapredict()
.- lambda
value of lambda at which to use predictions.
- sampleMetadata
data.frame of sample metadata.
- className
name of column in
sampleMetadata
containing the true labels.- classLevels
Order of classes in the confusion matrix. If
NA
(default), then the function uses the order incvFit
.- each
logical indicating whether to calculate a confusion matrix for each validation dataset (default) or one confusion matrix including all datasets.