Learn R Programming

VBmix (version 0.3.2)

EM:

Description

estimates a GMM on data using EM algorithm.

Usage

EM(data, ncomp, model=c("general", "diagonal", "spherical"), class=FALSE, 
	thres = 0.1, maxit = NULL, rbic=FALSE, debug=FALSE)

Arguments

data
matrix of row-elements.
ncomp
maximal number of components in the GMM. In case of degeneracies, the final model size may be less than ncomp.
model
Hypothesis on the modfel to estimate: "general", "diagonal" or "spherical" covariance matrices.
class
If TRUE, hard allocate elements in the E step (see CEM variant in Biernacki et al.). If FALSE, compute soft responsibilities as in usual EM algorithm.
thres
threshold for lower bound variations between 2 iterations. Convergence is decided if this variation is below thres.
maxit
if NULL, the stopping criterion is related to thres. If not NULL, maxit iterations are performed.
rbic
if FALSE, output BIC criterion associated to the obtained GMM. If TRUE, use a variant that accounts for the dimensionality of the model.
debug
if TRUE, display debug markers.

Value

estimated GMM with at most ncomp components, with labels containing associated labels for data in addition.
labels
Cluster labels taking values in 1..k
w
Numeric vector of cluster weights
mean
List of mean vectors
cov
List of covariance matrices
likelihood
Likelihood value of the model
bic
BIC criterion of the model

References

Bishop, C. M. (2006) _Pattern Recognition and Machine Learning_, Chapter 9, Springer. Biernacki, C. et al. _Model-based cluster and discriminant analysis with the MIXMOD software_, Computational Statistics and Data Analysis 51.2 (2006): 587-600.

See Also

newGmm varbayes

Examples

Run this code
temp <- EM(irisdata, 4)

Run the code above in your browser using DataLab