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 in using mixGaussFit: Matrix must be positive definite #121

Open
rayleigh007 opened this issue Jun 20, 2016 · 0 comments
Open

Error in using mixGaussFit: Matrix must be positive definite #121

rayleigh007 opened this issue Jun 20, 2016 · 0 comments

Comments

@rayleigh007
Copy link

OS: Windows & with Matlab 2015a

I was inputting a data=11 x 2180 comprises of 11 dimensions with 2180 observations to the function mixGaussFit(data, 2). It prompted the following error. How do i solved "Matrix must be positive definite."

Error using chol
Matrix must be positive definite.
Error in gaussSample (line 20)
A = chol(Sigma, 'lower');
Error in kmeansFit (line 42)
noise = gaussSample(zeros(1, length(v)), 0.01*diag(v), K);
Error in kmeansInitMixGauss (line 7)
[mu, assign] = kmeansFit(data, K);
Error in mixGaussFit>initGauss (line 38)
[mu, Sigma, model.mixWeight] = kmeansInitMixGauss(X, nmix);
Error in mixGaussFit>@(m,X,r)initGauss(m,X,r,initParams,prior) (line 24)
initFn = @(m, X, r)initGauss(m, X, r, initParams, prior);
Error in emAlgo (line 56)
model = init(model, data, restartNum);
Error in mixGaussFit (line 25)
[model, loglikHist] = emAlgo(model, data, initFn, @eStep, @mstep , ...

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

No branches or pull requests

1 participant