tchakravarty / pmtk3

Automatically exported from code.google.com/p/pmtk3
MIT License
1 stars 2 forks source link

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

Open GoogleCodeExporter opened 8 years ago

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

2. 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 reported on code.google.com by csghpo...@gmail.com on 27 Aug 2013 at 6:54

GoogleCodeExporter commented 8 years ago
Moved to GitHub: https://github.com/probml/pmtk3/issues/60

Original comment by irosen on 4 Jan 2014 at 2:39