| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
Construct Gaussian mixture distribution
obj = gmdistribution(mu,sigma,p)
obj = gmdistribution(mu,sigma,p) constructs an object obj of the gmdistribution class defining a Gaussian mixture distribution.
mu is a k-by-d matrix specifying the d-dimensional mean of each of the k components.
sigma specifies the covariance of each component. The size of sigma is:
d-by-d-by-k if there are no restrictions on the form of the covariance. In this case, sigma(:,:,I) is the covariance of component I.
1-by-d-by-k if the covariance matrices are restricted to be diagonal, but not restricted to be same across components. In this case, sigma(:,:,I) contains the diagonal elements of the covariance of component I.
d-by-d matrix if the covariance matrices are restricted to be the same across components, but not restricted to be diagonal. In this case, sigma is the pooled estimate of covariance.
1-by-d if the covariance matrices are restricted to be diagonal and the same across components. In this case, sigma contains the diagonal elements of the pooled estimate of covariance.
p is an optional 1-by-k vector specifying the mixing proportions of each component. If p does not sum to 1, gmdistribution normalizes it. The default is equal proportions.
Create a gmdistribution object defining a two-component mixture of bivariate Gaussian distributions:
mu = [1 2;-3 -5]; sigma = cat(3,[2 0;0 .5],[1 0;0 1]); p = ones(1,2)/2; obj = gmdistribution(mu,sigma,p); ezsurf(@(x,y)pdf(obj,[x y]),[-10 10],[-10 10])

[1] McLachlan, G., and D. Peel. Finite Mixture Models. Hoboken, NJ: John Wiley & Sons, Inc., 2000.
fit, pdf, cdf, random, cluster, posterior, mahal

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |