Learn R Programming

mclust (version 2.1-14)

sigma2decomp: Convert mixture component covariances to decomposition form.

Description

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

Usage

sigma2decomp(sigma, G, tol, ...)

Arguments

sigma
Either a 3-D array whose [,,k]th component is the covariance matrix for the kth component in an MVN mixture model, or a single covariance matrix in the case that all components have the same covariance.
G
The number of components in the mixture. When sigma is a 3-D array, the number of components can be inferred from its dimensions.
tol
Tolerance for determining whether or not the covariances have equal volume, shape, and or orientation. The default is the square root of the relative machine precision, sqrt(.Machine$double.eps), which is about 1.e-8
...
Catch unused arguments from a do.call call.

Value

  • The covariance matrices for the mixture components in decomposition form, including the following components:
  • dThe dimension of the data.
  • GThe number of components in the mixture model.
  • scaleEither 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.
  • shapeEither 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.
  • orientationEither 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 mixture components have a common orientation. The orientation component of decomp can be omitted in spherical and diagonal models, for which the principal components are parallel to the coordinate axes so that the orientation matrix is the identity.

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

decomp2sigma

Examples

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

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

sigma2decomp(meEst$sigma)
do.call("sigma2decomp", meEst)  ## alternative call

Run the code above in your browser using DataLab