0

I would like to know how I can get GMM speaker model using OpenIMaj library. org.openimaj.ml.gmm.GaussianMixtureModelEM. I have tried following

GaussianMixtureModelEM gmm = new GaussianMixtureModelEM
         (DEFAULT_NUMBER_COMPONENTS,GaussianMixtureModelEM.CovarianceType.Diagonal);

MixtureOfGaussians mixture =  gmm.estimate(data);
boolean convergerd  = gmm.hasConverged();

I get true that GaussianMixtureModelEM has converged, I am lost where to go from here. Any help guidance would be appreciated.

Muhammad
  • 121
  • 7
  • Can you explain what you're hoping to achieve? Once you've performed GMMEM, you would typically use the resultant MixtureOfGaussian model to compute probabilities or draw samples. – Jon Jun 03 '15 at 07:10
  • I have 935 points each with dimension 20, I used 256 components. gmm.estimate(data) returns me 256 guassians and 256 weight vectors where each Gaussian has mean and variance (both with dimension 20), next as you mentioned I can compute probabilities or I can draw samples from Gaussian distribution . How I can get single logLikelyhood value ? should I compute probability for a given points in space relative to the PDF represented by the gaussian mixture and sum them up ? – Muhammad Jun 03 '15 at 08:24

1 Answers1

0

Given your comment, then mixture.estimateLogProbability(point) should do what you want (see http://www.openimaj.org/apidocs/org/openimaj/math/statistics/distribution/MixtureOfGaussians.html#estimateLogProbability(double[])).

Jon
  • 841
  • 4
  • 5
  • Thankyou Jon, I figured it out. Jon if I am not mistaking you are one of the authors of Openimaj. I have been looking for the source of GMM and others related if you could kindly direct me where I cant get source. – Muhammad Jun 05 '15 at 08:59
  • Hi, is it safe to convert double log[] prob = mixture.estimateLogProbability(point) to get actual probability by taking exponential of logProb. – Muhammad Jun 05 '15 at 13:29
  • Code is here: https://github.com/openimaj/openimaj/blob/master/machine-learning/clustering/src/main/java/org/openimaj/ml/gmm/GaussianMixtureModelEM.java Yes, to estimate actual probability it's safe to use the exponential. – Jon Jun 05 '15 at 15:22
  • So far so good. Classical Gaussian mixtures worked great. Any advice how to extend GMM-EM to GMM-EM MAP training? So that it can also be used for universal background modeling? – Muhammad Jun 11 '15 at 14:59