Converts a classification into a matrix of indicator variables.
Usage
unmap(classification, noise, ...)
Arguments
classification
A numeric or character vector. Typically the distinct entries of this
vector would represent a classification of observations in a data set.
noise
A single numeric or character value used to indicate observations
corresponding to noise.
...
Provided to allow lists with elements other than the arguments can
be passed in indirect or list calls with do.call.
Value
An n by m matrix of (0,1) indicator variables,
where n is the length of classification and m is
the number of unique values or symbols in
classification. Columns are labeled by the unique values in
classification, and the [i,j]th entry is 1 if
classification[i] is the jth unique value or symbol in
order of appearance in the classification. If a noise
value of symbol is designated, the corresponding indicator variables
are located in the last column of the matrix.
References
C. Fraley and A. E. Raftery (2002a).
Model-based clustering, discriminant analysis, and density estimation.
Journal of the American Statistical Association 97:611-631.
See http://www.stat.washington.edu/mclust.
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.