Learn R Programming

mclust (version 2.1-14)

decomp2sigma: Convert mixture component covariances to matrix form.

Description

Converts a set of covariances from a parameterization by eigenvalue decomposition to representation as a 3-D array.

Usage

decomp2sigma(d, G, scale, shape, orientation, ...)

Arguments

d
The dimension of the data.
G
The number of components in the mixture model.
scale
Either a G-vector giving the scale of the covariance (the dth root of its determinant) for each component in the mixture model, or a single numeric value if the scale is the same for each component.
shape
Either a G by d matrix in which the kth column is the shape of the covariance matrix (normalized to have determinant 1) for the kth component, or a d-vector giving a common shape for all components.
orientation
Either a d by d by G array whose [,,k]th entry is the orthonomal matrix of eigenvectors of the covariance matrix of the kth component, or a d by d orthonormal matrix if the mix
...
Catch unused arguments from a do.call call.

Value

  • A 3-D array whose [,,k]th component is the covariance matrix of the kth component in an MVN mixture model.

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.

See Also

sigma2decomp

Examples

Run this code
data(iris)
irisMatrix <- as.matrix(iris[,1:4])
irisClass <- iris[,5]

meEst <- meVEV(irisMatrix, unmap(irisClass)) 
names(meEst)
meEst$decomp
meEst$sigma

dec <- meEst$decomp
decomp2sigma(d=dec$d, G=dec$G, shape=dec$shape, scale=dec$scale,
             orientation = dec$orientation)
do.call("decomp2sigma", meEst$decomp)  ## alternative call

Run the code above in your browser using DataLab