pacowong / bnt

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

Suspected bug wrt node sizes in potentials #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
First, let me thank you for providing and taking care for this great toolkit! 
I've been using it for a while and it opened lots of new possibilities for my 
research! 

What steps will reproduce the problem?
I have attached an .m file which reproduces the error. Note that the file is 
based on the Mixture-of-Experts example provided on this website. I changed the 
network to have dimension 2 in the node denoted by X. The error occurs in 
enter_evidence when assuming only X to be observed as evidence. If any other 
node is observed, the error does not occur. Also, the model can be learned 
without error. I added the comment "fails" to the respective lne in the script.

What is the expected output? What do you see instead?
Error using  + 
Matrix dimensions must agree.

Error in cpot/multiply_by_pot (line 11)
  bigpot.h(u) = bigpot.h(u) + smallpot.h;

Error in cgpot/multiply_by_pot (line 18)
  bigpot.can{i} = multiply_by_pot(bigpot.can{i}, smallpot.can{src});

Error in jtree_inf_engine/init_pot (line 17)
  clpot{c} = multiply_by_pot(clpot{c}, pots{i});

Error in jtree_inf_engine/enter_evidence (line 77)
[clpot, seppot] = init_pot(engine, clqs, pot, pot_type, onodes);

Error in TEST (line 36)
engine = enter_evidence(engine, {[-0.31; 0.1]; []; []});% fails

What version of the product are you using? On what operating system?
latest copmment in changelog is "7 May 2010 wsun", so I think it's the latest 
version of BNT; Matlab 2011b, Windows 7

Please provide any additional information below.
I am not very eductated wrt Bayesian networks, but I still have a suspicion 
what could be the "bug". IN multiply_by_pot, smalpot and bigpot are combined, 
where in bigpot, the observed continuous node's size has been set to 0 (see 
also bnt help on this page), while smallpot (the same observed ct. node) has 
size 2.

Original issue reported on code.google.com by klaus.en...@googlemail.com on 21 Mar 2012 at 7:59

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem. Did you manage to solve yours ? 

Original comment by swamiv...@gmail.com on 30 Jul 2013 at 9:35

GoogleCodeExporter commented 9 years ago
Unfortunately, I have not managed to solve this problem. I would be happy for a 
note if you will find out how to solve it!

Original comment by klaus.en...@googlemail.com on 31 Jul 2013 at 10:06