setting evidence and binary nodes

The engine.
Post Reply
GunnarVagotis
Posts: 2
Joined: Wed Feb 06, 2008 8:36 pm

setting evidence and binary nodes

Post by GunnarVagotis »

Hello,

I have noticed a behavior that I cannot find documented in the help file.
I am using a very simple bayes net formulation based off the tutorial. I just need to do inference over a network of binary nodes, and to set and unset evidence as my system makes observations.

I have built a network but some nodes, when I attempt to add evidence, do not change. I particular, here is the XML output for a node with prior probability of 1 that the value is "n" (for "no"):

<cpt id="retrainable">
<state id="n" />
<state id="y" />
<probabilities>1 0</probabilities>

When I set evidence to "y" (or 1) on this, the value() does not change. However, for this node:

<cpt id="planInPlay">
<state id="n" />
<state id="y" />
<probabilities>.999999 0.000001</probabilities>
</cpt>

using SetEvidence has the desired effect. Setting evidence for "y" changes the value() for "y" to 1.

Is there some special significance to having prior probability of 1 that means no amount of evidence can change the beliefs in the network?

thanks!
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: setting evidence and binary nodes

Post by shooltz[BayesFusion] »

SetEvidence will fail in this case (check the return code), because the prior probability for selected outcome is zero.

You may try to redirect SMILE's diagnostic stream to console with the following call:

ErrorH.RedirectToFile(stdout);

before calling SetEvidence.
GunnarVagotis
Posts: 2
Joined: Wed Feb 06, 2008 8:36 pm

Post by GunnarVagotis »

Thank you for your prompt reply. I will definitely try redirecting the error output for future reference.
Post Reply