⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 emiterate.m

📁 混合高斯模型 对于给定的数据
💻 M
字号:
function mixture1 = EMIterate(mixture, pixels)
% mixture1 = EMIterate(mixture, pixels)
%     perform the EM algorithm with a preassigned fixed order K
%
%     mixture: a mixture structure pre-initialized
%              mixture.K - order of the mixture
%              mixture.M - dimension of observations
%              mixture.cluster - an array of K cluster structure
%     pixels: a N x M observation matrix, each row is an observation vector
%
%     mixture1: converged result
%              mixture1.rissanen: MDL(K)
%

[N M] = size(pixels);
Lc = 1+M+0.5*M*(M+1);
epsilon = 0.01*Lc*log(N*M);
[mixture, llnew] = EStep(mixture, pixels);
while true
   llold = llnew;
   mixture = MStep(mixture, pixels);
   [mixture, llnew] = EStep(mixture, pixels);
   if (llnew-llold)<=epsilon
      break;
   end
end
mixture = rmfield(mixture, 'pnk');
mixture.rissanen = -llnew+0.5*(mixture.K*Lc-1)*log(N*M);
mixture.loglikelihood = llnew;
mixture1 = mixture;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -