The Expectation Maximization (EM) algorithm for Gaussian mixture model
Show older comments
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?
Answers (0)
Categories
Find more on Gaussian Mixture Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!