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

📄 lhlambdaalpha.m

📁 The goal of SPID is to provide the user with tools capable to simulate, preprocess, process and clas
💻 M
字号:
function lh=lhlambdaAlpha(y,alpha,pall,ff,pars)

K=length(unique(y));c=K-1;

pref=1-sum(pall,2);
N=length(y);

lh=0;
for i=1:c
    index=find(y==i);
    lh=lh + sum(log(max(eps,pall(index,i))));
end
index=find(y==c+1);
lh=lh + sum(log(max(eps,pref(index))));
normalpha=0;
for cc=1:c,
  normalpha=normalpha+alpha(:,cc)'*ff(:,cc);
end

lh=lh - 0.5*N*pars.lambda*normalpha;

⌨️ 快捷键说明

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