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

📄 ksi_matrix.m

📁 greedy em 混和模型训练算法
💻 M
字号:
%%%% Create the Ksi matrix of size [ m X n ]                %%%%%
%%%% Each row i contains the probabilities P(x_j|theta_i)   %%%%%
%%%% where x_j (j=1,..,n) is the substring, and             %%%%%
%%%% theta_i is the probability matrix corresponds to       %%%%%
%%%% candidate i                                            %%%%%
%%%%                                                        %%%%%
%%%%%% Kostas Blekas, 19 Dec. 2001                          %%%%%
%%%%%% please contact at kblekas@cc.uoi.gr in case of problems %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [Ksi] = Ksi_matrix(n,m,alpha,lambda,L,W,thesh,C)
                
k = 1;

for i=1:m

    mtry = ones(L,W) .* (1.0 - lambda)/(L-1);
    for j=1:W
        mtry(find(C(i,j)==alpha),j) = lambda;
    end
    
    for j=1:n
        Ksi(i,j) = prod(diag(mtry(thesh(j,:),:)));      
    end 
    k = k+1;
end

⌨️ 快捷键说明

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