You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure whether it is a bug in junction tree inference and variable elimination.
For the following BN model, when computing marginal for each node given node 1, I have tested Junction tree inference , variable elimination and pear_inf_engine. I found that the results by Junction tree and variable elimination are incorrect while pear_inf_engine is correct. I have no idea what happens in the Junition tree and the variable elimination engine .
I compute the marginal given node 1 for each other node manually. For node 8 and node 9, only pearl_infer_engine gets the right results.
I put the learned bnet model (matlab format) in the attachment.
Model configuration :
The text was updated successfully, but these errors were encountered:
yzhang2016
changed the title
There might a bug in jtree_inf_engine and var_elim_inf_engine
There might be a bug in jtree_inf_engine and var_elim_inf_engine
Apr 6, 2016
Hi,
I am not sure whether it is a bug in junction tree inference and variable elimination.
For the following BN model, when computing marginal for each node given node 1, I have tested Junction tree inference , variable elimination and pear_inf_engine. I found that the results by Junction tree and variable elimination are incorrect while pear_inf_engine is correct. I have no idea what happens in the Junition tree and the variable elimination engine .
I compute the marginal given node 1 for each other node manually. For node 8 and node 9, only pearl_infer_engine gets the right results.
I put the learned bnet model (matlab format) in the attachment.
Model configuration :
## Results : P(A8 = 2 | A1) P(A9 = 2 | A1)
Result : jtree
Result : var_elim
Result : pearl
## *Manual *:
code:
---------------------------
jtree_Engine = jtree_inf_engine(bnet) ;
var_Engine = var_elim_inf_engine(bnet) ;
pearl_Engine = pearl_inf_engine(bnet) ;
jtree_conMarg = compMarginal (bnet,jtree_Engine) ;
var_conMarg_ = compMarginal (bnet,var_Engine) ;
pearl_conMarg_ = compMarginal (bnet,pearl_Engine) ;
function [conMarg] = compMarginal (bnet,engine)
%% First node : exp, 8 states, others : AUs, binary
numNodes = size(bnet.dag,1) ;
numAUs = numNodes - 1;
numCls = bnet.node_sizes(1) ;
evidence = cell(1,numNodes) ;
conMarg = zeros(numCls,numAUs) ;
for i = 1 : numCls
evidence{1} = i ;
engine = enter_evidence(engine,evidence) ;
for j = 1 : numAUs
temNodeInd = j + 1 ;
temMarg = marginal_nodes(engine,temNodeInd) ;
conMarg(i,j) = temMarg.T(2) ;
end
end
bnet_learnedModel.zip
The text was updated successfully, but these errors were encountered: