?? bic_score_cpd.m
字號:
function score = BIC_score_CPD(CPD, fam, data, ns, cnodes)% BIC_score_CPD Compute the BIC score of a tabular CPD% score = BIC_score_CPD(CPD, fam, data, ns, cnodes)if iscell(data) local_data = cell2num(data(fam,:));else local_data = data(fam, :);endcounts = compute_counts(local_data, CPD.sizes);CPT = mk_stochastic(counts); % MLEtiny = exp(-700); CPT = CPT + (CPT==0)*tiny; % replace 0s by tinyLL = sum(log(CPT(:)) .* counts(:));N = size(data, 2);score = LL - 0.5*CPD.nparams*log(N);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -