Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Dec 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

Moved to GitHub: https://github.com/probml/pmtk3/issues/60

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant