minmis {EMMIXmfa} | R Documentation |
Minimum Number of Misallocations
Description
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)
Arguments
cls |
A numeric or character vector of labels. |
hat_cls |
A numeric or character vector of labels same length as |
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.
Value
Integer specifying the minimum number of misallocations.
See Also
Examples
set.seed(1984)
Y <- scale(iris[, -5])
model <- mcfa(Y, g = 3, q = 3, nkmeans = 1, nrandom = 0, itmax = 200)
ari(model$clust, iris[, 5])
minmis(model$clust, iris[, 5])
[Package EMMIXmfa version 2.0.14 Index]