pmtk3 icon indicating copy to clipboard operation
pmtk3 copied to clipboard

Error, How to deal with the error of "Matrix must be positive definite"

Open ido opened this issue 11 years ago • 0 comments

From [email protected] on August 27, 2013 02:54:20

What steps will reproduce the problem? 1.words frequencies in documents of each slice are used as the input of hmmMixGaussTiedTest.m

  1. Then it output "initializing model for EM; Error using chol; Matrix must be positive definite."

I think that the Sigma is not positive definite.

How to deal with this situation? What is the expected output? What do you see instead? I want to estimate the parameters of HMM with Gaussian Mixture Model. What version / revision of the product are you using? On what operating system? pmtk3 Please provide any additional information below. details are as bellow:

initializing model for EM Error using chol Matrix must be positive definite.

Error in gaussLogprob (line 52) R = chol(Sigma);

Error in mixGaussInferLatent (line 17) logPz(:, k) = logMix(k) + gaussLogprob(mu(:, k), Sigma(:, :, k), X);

Error in mixGaussFit>estep (line 52) [weights, ll] = mixGaussInferLatent(model, data);

Error in emAlgo (line 62) [ess, ll] = estep(model, data);

Error in mixGaussFit (line 25)

[model, loglikHist] = emAlgo(model, data, initFn, @estep, @mstep , ...

Original issue: http://code.google.com/p/pmtk3/issues/detail?id=60

ido avatar Jan 04 '14 01:01 ido