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

📄 multinom_logistic.m

📁 The BNL toolbox is a set of Matlab functions for defining and estimating the parameters of a Bayesi
💻 M
字号:
function y=multinom_logistic(x)
%y=multinom_logistic(x) computes probabilities for multinomial logistic
%model (softmax function)
%for nd arrays, sum over dimension nd
%if only one vector, use row vector!


%if size(x,2)==1 error('use row vectors'),end
%if isempty(find(sum(x,1)==0)) error ('one column should consist of zeros'), end
d=ndims(x);
y=exp(x)./repmat(sum(exp(x),d),[ones(1,ndims(x)-1) size(x,d)]);


⌨️ 快捷键说明

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