update probability values for an independent node created in genie

The engine.
Post Reply
asvnphanindra
Posts: 2
Joined: Tue Jul 03, 2018 2:30 pm

update probability values for an independent node created in genie

Post by asvnphanindra » Wed Jul 04, 2018 8:18 am

Hi,

I am new to working with smile and genie.

I have created a simple graphical model in genie with 4 nodes and each node has a defined set of outcomes with some probability values. Now I have imported this model to the .net framework using the smile.dll library. I would like to set evidence along with their probability values dynamically runtime using smile wrappers. Smile provides a wrapper called network.setEvidence() to set evidence. But I am not able to find a function that helps me update the evidence along with the probability values.

Kindly help me in this regard.

Best Regards
Phanindra

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

Re: update probability values for an independent node created in genie

Post by shooltz[BayesFusion] » Wed Jul 04, 2018 8:25 am

If you change the evidence, you should call Network.UpdateBeliefs to recalculate the probabilities.

asvnphanindra
Posts: 2
Joined: Tue Jul 03, 2018 2:30 pm

Re: update probability values for an independent node created in genie

Post by asvnphanindra » Wed Jul 04, 2018 8:45 am

shooltz[BayesFusion] wrote:If you change the evidence, you should call Network.UpdateBeliefs to recalculate the probabilities.
Dear Shooltz,

Many thanks for your reply. I would like to update the evidence along with the probabilities. Please consider the below example
let us say I have a testNetwork with node name weather, possible evidence are sunny with 0.5 probability and rainy with 0.5 probability created in genie. now I have imported this testNetowrk into .net using smile read file function. I would like to set the evidence for the node weather with possible evidence as sunny with probability 0.75 and rainy with probability 0.25. then I would like to invoke the Network.UpdateBeliefs function to recalculate the probabilities.

Kindly share your comments on the same.

Best Regards
Phanindra

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

Re: update probability values for an independent node created in genie

Post by shooltz[BayesFusion] » Wed Jul 04, 2018 8:53 am

Try using Network.SetVirtualEvidence. See Using GeNIe/Bayesian networks/Virtual Evidence chapter in GeNIe's manual for the theoretical background on virtual evidence.

Post Reply