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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!