ztoc {mclust1998} | R Documentation |
Conversion between conditional probabilities and a classification
Description
The function ctoz converts a discrete classification into
the corresponding z matrix. ztoc converts a z matrix to the nearest
classification.
Usage
ztoc(z)
ctoz(cl, noise)
Arguments
z |
Matrix with conditional probabilities; each object one row,
and each cluster one column. |
cl |
Classification vector. |
noise |
Noise indicator vector. |
Examples
data(iris)
cltree <- mhtree(iris[,1:4], modelid="VVV")
cl <- mhclass(cltree, 3)
origz <- ctoz(cl)
z <- me(iris[,1:4], modelid="VVV", origz)
newcl <- ztoc(z)