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

📄 deriv_multinom_logist.m

📁 The BNL toolbox is a set of Matlab functions for defining and estimating the parameters of a Bayesi
💻 M
字号:
function d=deriv_multinom_logist(x)
%computes derivative of multinomial logistic function in x
%see Bischop C p.217
%x is row cvector or matrix and does not contain column of zeros!!

s=size(x);
%if (s(2)==1 &&s(1)>1) error('use row vectors'),end
y=multinom_logistic([zeros(size(x,1),1) x]); %add column of zeros for multinom_logistic
y(:,1)=[]; %remove first column again
v=ones(1,s(2));

e=eye(s(2));
t1=kron(v,y).*(ones(s(1),1)*e(:)');
t2=kron(y,v).*kron(v,y);
d=t1-t2;
d=reshape(d',[s(2) s(2) s(1)]);
%d=d(2:end,2:end,:);
end

⌨️ 快捷键说明

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