Given two vectors each corresponding to a set of categories,
this function finds the minimum number of misallocations
by rotating the categories.
Usage
minmis(cls, hat_cls)
Value
Integer specifying the minimum number of misallocations.
Arguments
cls
A numeric or character vector of labels.
hat_cls
A numeric or character vector of labels same length as cls.
Details
Rotates the categories for all possible permutations, and
returns the minimum number of misallocations.
The number of categories in each set of labels does not need to
be the same.
It may take several minutes to compute when the number of categories
is large.