ERROR: Initial covariance is required, even though I am giving it the covariance in gmdistribution.fit.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to fit a Gaussian mixture model for data, I am calculated inital means, covariance and Pcomponents , and created a structure S. Then I use this command to fit the model.
opts = statset('MaxIter', 30);
obj = gmdistribution.fit(data,maxk,'Start',S,'CovType','diagonal','Options',opts);
Where S is a structure which has the means, covariance and Pcomponents in the desired format. But when I run it i always get the error.
Error using gmcluster>checkInitParam (line 384) The initial covariance is required.
Error in gmcluster (line 135) initPara=checkInitParam(start,k,d,CovType, SharedCov);
Error in gmdistribution.fit (line 174) [S,NlogL,optimInfo] =...
But I am giving it initial covariance, any input on this will be appreciated.
------- Eric
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!