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

📄 construct_scpt.m

📁 The BNL toolbox is a set of Matlab functions for defining and estimating the parameters of a Bayesi
💻 M
字号:
function smallCPTs=construct_sCPT(lin_pred,equiv_class,gausskwadnodes)
%smallCPTs=construct_sCPT constructs conditional probability tables 
%small: data not yet incorporated -> same CPTs for all persons

%does not always work (permute dimensions should be checked)

smallCPTs=cell(size(lin_pred));
for i=1:length(lin_pred)
    s=size(lin_pred{i});
    f=find(equiv_class==i,1);
    nodenr=find(gausskwadnodes.nodenrs==f,1);
    if ~isempty(f)
    [x,w]=herzo(gausskwadnodes.nodesizes(nodenr);%no rounding erros for guaaskwad nodes
    %by taking logit and transforming back to probs
    probs=w';
    else
    probs=multinom_logistic(lin_pred{i});
    end
    if isvector(probs) probs=probs(:);, end;
    smallCPTs{i}=probs;
end

⌨️ 快捷键说明

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