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

📄 emcpm_loglike.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function logLike = EMCPM_logLike(G,samplesMat)%% Compute the log likelihood of the data for the% EM-CPM used parameters stored in structure G, and% observed data stored in samplesMatfunction logLike = EMCPM_logLike(G,samplesMat)smoothLikes=getSmoothLike(G,G.z,G.u);[timePriorTerm, scalePriorTerm] = getDirichletLike(G);nuTerm = getNuTerm(G);scaleCenterPriorTerm = getScaleLike(G,G.u);for kk=1:G.numSamples    %% E-step (obtaining gammas), using forward-backward in    %% standard way, with scaling tricks (not in log space)    myClass = getClass(G,kk);    doback=0;  %% do backward pass    tmpZ = permute(G.z(:,myClass,:),[1 3 2]);    [mainL(kk)]=FB(G,samplesMat(:,:,kk),kk,tmpZ,doback);endlogLike = sum(mainL) + scalePriorTerm + sum(timePriorTerm) + ...    sum(smoothLikes) + scaleCenterPriorTerm + nuTerm;

⌨️ 快捷键说明

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