cecilyhs / bnt

Automatically exported from code.google.com/p/bnt
0 stars 0 forks source link

BNT example code problem!!! #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I am trying to run the example which is on this link
"http://bnt.googlecode.com/svn/trunk/docs/usage.html" but I got some
errors. I attached the file please run it and tell me if I did any mistake.

2. I want to Marginalize the "S" node w.r.t "R".
3. And I am getting these errors in MATLAB. I am pasting below:
??? Index exceeds matrix dimensions.

Error in ==> discrete_CPD.convert_to_table at 14
T = CPT(index{:});

Error in ==> discrete_CPD.convert_to_pot at 20
   T = convert_to_table(CPD, domain, evidence);

Error in ==> jtree_inf_engine.enter_evidence at 57
      pot{n} = convert_to_pot(bnet.CPD{e}, pot_type, fam(:), evidence);

Error in ==> BN_cct1 at 15
[engine, loglik] = enter_evidence(engine, evidence);

What is the expected output? What do you see instead?
Ans: Expected output should be a value of marginal probability.

What version of the product are you using? On what operating system?
MATLAB 7.6.0 (R2008a) at VISTA HOME PREMIUM.

Please provide any additional information below.

Original issue reported on code.google.com by usmanst...@gmail.com on 9 May 2010 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago
You forgot to put 

discrete_nodes = 1:N;
node_sizes = 2*ones(1,N);

Original comment by raghaven...@gmail.com on 25 Jul 2011 at 10:55