compClass: Compare classifications having the same number of groups.
Description
Error rate and best correspondence between two
classifications having the same number of groups.
Usage
compClass(a, b)
Arguments
a
A numeric or character vector of class labels.
b
A numeric or character vector of class labels. Must have the same
length and the same number of class labels as a.
Value
A list consisting of the following components:
errorThe minimum error rate between the two classifications,
taken over all possible permutations.
mapA matrix giving a correspondence between the unique elements of
a and b that gives the minimum error rate. (Note:
there may be more than one mapping that achieves the minimum error
rate.)
References
C. Fraley and A. E. Raftery (2002b).
MCLUST:Software for model-based clustering, density estimation and
discriminant analysis.
Technical Report, Department of Statistics, University of Washington.
See http://www.stat.washington.edu/mclust.