Gaussian Mixture Model fit question

Hello,
I dont understand everything in the example below. In my case, I have a 2D matrix (an image) of data and want to find two highest gaussians there. But this exemplary code does not relay on 2D image as an input. Instead, X has a size od 2000x2. What should I do to make it working on 2D square matrix?

3 Comments

A Gaussian Mixture Model is a statistical model that does not take into account any spatial link between the observations for the given variables so you would just collapse your data into a 1d column to use a Gaussian Mixture Model, or multiple 1d columns if you have, for example, RGB data with the 3 channels each being their own variable.
Thanks, It seems it`s working. But how can I later extract coordinates of those gaussians from 1x1 gmdistribution?
You can't unless you do some classification into the model. A statistical model is just an idealised model of data that was input to create it. That input data is effectively lost and replaced by the model which is supposed to represent an approximation of that data by a well-defined model rather than just arbitrary data points.

Sign in to comment.

Answers (0)

Asked:

on 10 Aug 2016

Commented:

on 10 Aug 2016

Community Treasure Hunt

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

Start Hunting!