EM Algorithm {EMCluster} | R Documentation |
These are core functions of EMCluster performing EM algorithm for model-based clustering of finite mixture multivariate Gaussian distribution with unstructured dispersion.
emcluster(x, emobj = NULL, pi = NULL, Mu = NULL, LTSigma = NULL, lab = NULL, EMC = .EMC, assign.class = FALSE) shortemcluster(x, emobj = NULL, pi = NULL, Mu = NULL, LTSigma = NULL, maxiter = 100, eps = 1e-2) simple.init(x, nclass = 1)
x |
the data matrix, dimension n * p. |
emobj |
the desired model which is a list mainly contains |
pi |
the mixing proportion, length K. |
Mu |
the centers of clusters, dimension K * p. |
LTSigma |
the lower triangular matrices of dispersion, K * p(p+1)/2. |
lab |
labeled data for semi-supervised clustering, length n. |
EMC |
the control for the EM iterations. |
assign.class |
if assigning class id. |
maxiter |
maximum number of iterations. |
eps |
convergent tolerance. |
nclass |
the desired number of clusters, K. |
The emcluster
mainly performs EM iterations starting from the given
parameters emobj
without other initializations.
The shortemcluster
performs short-EM iterations as described in
init.EM
.
The emcluster
returns an object emobj
with class emret
which can be used in post-process or other functions such as
e.step
, m.step
, assign.class
, em.ic
,
and dmixmvn
.
The shortemcluster
also returns an object emobj
with class
emret
which is the best of several random initializations.
The simple.init
utilizes rand.EM
to obtain a simple initial.
Wei-Chen Chen wccsnow@gmail.com and Ranjan Maitra.
https://www.stat.iastate.edu/people/ranjan-maitra/
init.EM
, e.step
, m.step
,
.EMControl
.
library(EMCluster, quietly = TRUE) set.seed(1234) x1 <- da1$da emobj <- simple.init(x1, nclass = 10) emobj <- shortemcluster(x1, emobj) summary(emobj) ret <- emcluster(x1, emobj, assign.class = TRUE) summary(ret)