em

From STX Wiki
Jump to navigationJump to search

Implementation of the Expectation Maximization (EM) algorithm for finding maximum likelihood estimates of the parameters of a Gaussian Mixture Model (GMM) (i.e. estimates the model parameters for which the observed data are most likely).

Usage
em(x, meantable, membertable, sigmatable, wtable, aposterioritable, minvar, emmaxit, likthresh {, accurate})
x
feature vectors, 1 feature vector per row ((Nvectors x Ndimensions)
meantable
output matrix for estimated mean vectors (Nmixtures x Ndimensions)
membertable
vector with Nvectors elements, defining the feature vector memberships to mixtures, resulting from prior clustering
sigmatable
output matrix for estimated covariance vectors (i.e. diagonal of covariance matrices) of mixture model (Nmixtures x Ndimensions)
wtable
output vector of estimated mixture weights (Nmixtures)
aposterioritable
if a table item is given, it will contain the output a posteriori probabilities of the feature vectors, otherwise (if a number is given) it won't be changed
minvar
minimum variance
emmaxit
maximum number of iterations
liktresh
log-likelihood threshold; if the difference between log-likelihoods of two consecutive iterations is less than this threshold, the algorithm halts
accurate
  • if 1, the accurate log-likelihood estimation is used
  • otherwise use the Intel IPP fast log. add method
Result
The estimated model parameters are stored in the references meantable, sigmatable, wtable and (optional) aposterioritable. The return value r is vector with 10 elements, containing informations about the estimation process.
r[0] number of feature vectors
r[1] number of dimensions
r[2] number of mixture components
r[3] number of iterations performed by the algorithm
r[4] joint log-likelihood of the data in the estimated model
r[5] -1 (initialisation max. iterations, apparently unused)
r[6] maximum number of iterations
r[7] log-likelihood threshold
r[8] value of the "accurate" parameter
r[9] 0 (= method used is EM for diagonal covariance matrices)
See also
haclust, modclust, density, svd

<function list>

Navigation menu

Personal tools