Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visualize Gaussian Mixture Model clusters in MATLAB

I have to write a classifier (Gaussian Mixture model) to use for human action recognition. I have 4 dataset of video, each of them contains 12 action that I want to recognize. I choose 3 of them as training set and 1 of them as testing set. For each frame I extract 907 features that are my observations. Before I apply the GM model on the training set I run PCA on it. So I consider only 50 components.

I construct the GM model with one cluster of each action.

gm = gmdistribution.fit(data, cluster_num, 'Options', options, 'CovType','diagonal','Regularize', 1e-10, 'SharedCov', true);

Now I want to have a visual feedback to understand if the clustering worked well or the data are misclassified.

Is it possible have something like this? enter image description here

like image 356
Mario Lepore Avatar asked Sep 27 '12 17:09

Mario Lepore


People also ask

How can a Gaussian mixture model be used for clustering?

Gaussian mixture models (GMMs) are often used for data clustering. You can use GMMs to perform either hard clustering or soft clustering on query data. To perform hard clustering, the GMM assigns query data points to the multivariate normal components that maximize the component posterior probability, given the data.

Is GMM hard clustering?

Cluster the Data Using the Fitted GMMcluster implements "hard clustering", a method that assigns each data point to exactly one cluster. For GMM, cluster assigns each point to one of the two mixture components in the GMM. The center of each cluster is the corresponding mixture component mean.

What are the differences between K-Means and GMM Gaussian mixture model?

K-Means and Gaussian Mixture Model (GMM) are unsupervised clustering techniques. K-Means groups data points using distance from the cluster centroid [8] - [16]. GMM uses a probabilistic assignment of data points to clusters [17] - [19]. Each cluster is described by a separate Gaussian distribution.


1 Answers

I am not near the code I wrote to make these, but I remember which functions are worth looking at.

Start here with plot_gaussian_ellipsiod. You can further add gmdistribution and ezcontour to end up with something like this:

enter image description here

Or, for 3d data, you could use plot3 and plot_gaussian_ellipsiod :

enter image description here

like image 135
AGS Avatar answered Oct 23 '22 07:10

AGS