1

This problem is solved. Thank you @dpwe
I first make the GMM by gmdistribution. Then I want to have a function that can return the probability of my Observation. That is:

GMMObject = gmdistribution(Vec_Mean, Matrix_Covariance, Vec_Weight);
Probability = posterior(GMMObject, Vec_Observation) * Vec_Weight;

The value of Probability should equal to p(x)

But I find that log(Probability) is not equal to nlogl where:

[Dummy, nlogl] = posterior(GMMObject, Vec_Observation)


So I am wondering where is my mistake.

Community
  • 1
  • 1
sflee
  • 1,659
  • 5
  • 32
  • 63
  • 2
    The first return from posterior() is the posterior values, i.e. the individual w_k N(x|\mu_k, \Sigma_k) terms *normalized by p(x)*, so sum(posterior(...)) = 1. Your expression for Probability ignores this normalization. Also, I think the Vec_Weight is probably already factored in to the posterior returns. – dpwe Jun 04 '14 at 16:40
  • Hi @sflee, I have a very similar problem, did you manage to solve yours?. Here is my problem: http://stackoverflow.com/questions/24257192/classify-using-gmm-with-matlab – jessica Jun 17 '14 at 16:09

0 Answers0