(list | matrix) list of matrices (one for each unique value of labels) with
values 1 (correct prediction) and 0 (false prediction).
If partition=TRUE, the matrices are combined in a single matrix with rbind.
Arguments
predictions
(numeric | character) vector of class predictions, class and unique values+
need to match those of labels.
labels
(numeric | character) vector of true class labels (reference standard)
partition
(logical) should result be split into one matrix per class (TRUE; default) or not (FALSE)
names
(character | NULL) named character. Values specify data values, names specify class names.
If names=NULL, the values and names are defined as unique(labels)