Description Usage Arguments Details Value Author(s) See Also Examples
The regular expectationmaximization algorithm for general multivariate Gaussian mixture models.
1 2  EMAlgorithm(x, theta, eps = 1e06, max.ite = 1e+05, trace.theta = FALSE,
verbose = FALSE)

x 
A matrix of observations where rows correspond to features and columns to experiments. 
theta 
A list of parameters as described in 
eps 
The maximal required difference in successive likelihoods to establish convergence. 
max.ite 
The maximum number of iterations. 
trace.theta 
Logical. If 
verbose 
Set to 
Though not as versatile, the algorithm can be a faster alternative to
Mclust
in the mclust
package.
A list of length 3 with elements:
theta 
A list of the estimated parameters as described in

loglik.tr 
A numeric vector of the loglikelihood trace. 
kappa 
A matrix where 
Anders Ellern Bilgrau <[email protected]>
1 2 3 4 5 6 7 8 9 10  set.seed(10)
data < SimulateGMCMData(n = 1000, d = 2, m = 3)
start.theta < rtheta(d = 2, m = 3)
res < GMCM:::EMAlgorithm(data$z, theta = start.theta)
par(mfrow = c(1,2))
plot(data$z, cex = 0.5, pch = 16, main = "Simulated data",
col = rainbow(3)[data$K])
plot(data$z, cex = 0.5, pch = 16, main = "GMM clustering",
col = rainbow(3)[apply(res$kappa,1,which.max)])

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.