Azzera filtri
Azzera filtri

Why gmdistribution.fit gives me different values?

1 visualizzazione (ultimi 30 giorni)
Hewitt
Hewitt il 6 Mar 2015
Commentato: zahra zaeri il 7 Mar 2015
When I fit data to GMM using gmdistribution.fit I get different values of mean , Covariance and weight. How to make it give constant values. Thanks in advance.

Risposte (1)

Adam
Adam il 6 Mar 2015
From the help page (for fitgmdist in R2014b which has replaced gmdistribution.fit):
You can fit a GMM with defined initial values as in the example given:
Mu = [1 1; 2 2; 3 3];
Sigma(:,:,1) = [1 1; 1 2];
Sigma(:,:,2) = 2*[1 1; 1 2];
Sigma(:,:,3) = 3*[1 1; 1 2];
PComponents = [1/2,1/4,1/4];
S = struct('mu',Mu,'Sigma',Sigma,'ComponentProportion',PComponents);
GMModel3 = fitgmdist(X,3,'Start',S);
By default a k-means algorithm is used which includes a random element and is thus not deterministic.
  3 Commenti
Adam
Adam il 6 Mar 2015
Please accept the answer if it resolves the problem so people can see the question is answered and does not need further attention.
zahra zaeri
zahra zaeri il 7 Mar 2015
this problem was my question,tnx alot adam!

Accedi per commentare.

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by