ztoc {mclust} | 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)