How is ComponentProportion calculated by fitgmdist
7 views (last 30 days)
Show older comments
Chris Volpe
on 25 Apr 2016
Commented: Chris Volpe
on 31 Jan 2025 at 20:54
I run fitgmdist on some data (total of 40 instances/samples) and and get a two-component Gaussian Mixture Model with ComponentProportion containing an array of two values: 0.8927 and 0.1073. Using the cluster method on the resulting gmdistribution, and passing in the original 40-element array, it returns an array of cluster IDs, 36 of which have the value "1", and 4 of which have the value "2". My expectation was that ComponentProportion would have contained exactly [0.9, 1.0] to reflect the ratios of cluster IDs in the data being fit. But apparently that's not the case. Can anyone tell me where the actual ComponentProportion values come from? Thanks.
0 Comments
Accepted Answer
Ayush Aniket
on 28 Jan 2025 at 13:02
The ComponentProportion values in a Gaussian Mixture Model (GMM) created using fitgmdist in MATLAB do not directly reflect the observed proportions of cluster assignments in your data. Instead, they represent the prior probabilities of each component in the mixture model.
These values are the estimated mixing proportions of each Gaussian component in the model. They are determined during the fitting process (using Expectation Maximization Algorithm) and represent the model's belief about the proportion of data points that belong to each component in the underlying distribution, not just in your sample.
When you use the cluster method, it assigns each data point to the component that has the highest posterior probability for that point. The resulting cluster assignments reflect the most likely component for each data point given the model.
Refer to the following documentation link to read more about the property: https://www.mathworks.com/help/stats/gmdistribution.html#mw_e6c23088-2050-4abf-992e-1767d941830a
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!