EM_GM

An expectation maximization algorithm for learning a multi-dimensional Gaussian mixture.
28.4K Downloads
Updated 4 Apr 2016

View License

Although EM algorithm for Gaussian mixture (EM_GM) learning is well known, 3 major MATLAB EM_GM codes are found on the web. However, they either have errors or not easy to incorporate into other MATLAB codes. Therefore, I decide to write my own EM_GM and share it. My EM_GM is designed as a single file function (i.e. all sub functions are included in the same file) for convenience and portability.
Detail descriptions of all inputs and outputs are included in the file. EM_GM can be controlled to plot 1D or 2D problems and display CPU time used as well as number of iterations.

Example:
X = zeros(600,2);
X(1:200,:) = normrnd(0,1,200,2);
X(201:400,:) = normrnd(0,2,200,2);
X(401:600,:) = normrnd(0,3,200,2);
[W,M,V,L] = EM_GM(X,3,[],[],1,[])

Cite As

Patrick Tsui (2024). EM_GM (https://www.mathworks.com/matlabcentral/fileexchange/8636-em_gm), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Just updating the license.
Enchance likelihood computation