Single Step | R Documentation |
These functions are single E- and M-step of EM algorithm for model-based clustering of finite mixture multivariate Gaussian distribution with unstructured dispersion.
e.step(x, emobj = NULL, pi = NULL, Mu = NULL, LTSigma = NULL,
norm = TRUE)
m.step(x, emobj = NULL, Gamma = NULL, assign.class = FALSE)
x |
the data matrix, dimension |
emobj |
the desired model which is a list mainly contains |
pi |
the mixing proportion, length |
Mu |
the centers of clusters, dimension |
LTSigma |
the lower triangular matrices of dispersion,
|
norm |
if returning normalized |
Gamma |
containing posterior probabilities if normalized,
otherwise containing component densities weighted by
mixing proportion, dimension |
assign.class |
if assigning class id. |
These two functions are mainly used in debugging for development and post process after model fitting.
The e.step
returns a list contains Gamma
, the posterior
probabilities if norm=TRUE
, otherwise it contains component densities.
This is one E-step and Gamma
is used to update emobj
in
the M-step next.
The m.step
returns a new emobj
according to the Gamma
from the E-step above.
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
https://www.stat.iastate.edu/people/ranjan-maitra
init.EM
.
library(EMCluster, quietly = TRUE)
x2 <- da2$da
emobj <- list(pi = da2$pi, Mu = da2$Mu, LTSigma = da2$LTSigma)
eobj <- e.step(x2, emobj = emobj)
emobj <- m.step(x2, emobj = eobj)
emobj
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.