The Expectation Maximization (EM) algorithm for Gaussian mixture model
Afficher commentaires plus anciens
I have four (N) Gaussian component with 1000 (M1:M4) random sample for each. The following is the procedure: xn=STD(n)*randn(M(n),1) + mu(n). And x=[x1; x2; x3; x4]. I use these following: options = statset('Display','final') obj = gmdistribution.fit(x,N,'Options',options). for i = 1:N, mu(i) = obj.mu(i); sigma(i) = sqrt(obj.Sigma(1,1,i)); weight(i) = obj.PComponents(i); gaussPdfi(:,i) = weight(i)*normpdf(xaxis,mu(i),sigma(i))/A; end This method works, but for each Gaussian component I have the fixed Weight (w) and gmdistribution.fit does not take weight into account and each time I run the program, it gives me random weight, and random shape accordingly.
How can I consider fixed weight into my calculation in order to get fixed shape each time I run the program?
Réponses (0)
Catégories
En savoir plus sur Gaussian Mixture Models dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!