The Expectation Maximization (EM) algorithm for Gaussian mixture model

1 次查看(过去 30 天)
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?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by