node evidence

The engine.
Post Reply
sara
Posts: 4
Joined: Thu Aug 11, 2022 12:53 pm

node evidence

Post by sara »

Hi,
can you explain to me what is node evidence?
and how can i get the conditional probability table and the prior probability of a node
and the nodes of the evidence and the states of the evidences nodes?
Thanks.
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: node evidence

Post by marek [BayesFusion] »

Hi Sara,

"Evidence" is a very basic term in Bayesian inference and denotes an observation of a concrete state of a node. Your question is about SMILE programming and there are most certainly people at BayesFusion and outside who know more than I do about SMILE programming. You can get examples of SMILE calls in various programming languages (C++, Java, Python, R, and .NET) in BayesFusion's documentation, available among others from the following web page:

https://support.bayesfusion.com/docs/

Getting the CPT in Python, for example:

net.get_node_definition(node_handle)

Getting the marginal probabilities (used for both priors and posteriors, depends when you make the call) in Python:

net.get_node_value(node_handle)

Setting and clearing evidence in Python:

net.set_evidence(node_id, outcome_id)
net.clear_evidence(node_id)

Does this help?

Marek
sara
Posts: 4
Joined: Thu Aug 11, 2022 12:53 pm

Re: node evidence

Post by sara »

yes thank you.
i have this definition
Cpt.PNG
Cpt.PNG (30.58 KiB) Viewed 2639 times
and i want to get the nei
please how can i get it.
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: node evidence

Post by marek [BayesFusion] »

I am a little confused, as in the Bayesian networks world we call the probability tables that are the definition of a node CPTs, Conditional Probability Tables. They are indexed not by evidence but by the various combinations of the states of parents of the node. It is possible that they mean something else than a CPT in this definition. I cannot establish this based on just the definition.

Generally, for CPTs please look for the methods in SMILE that operate on the definition -- there should be methods that get individual elements of the CPT. If, on the other hand, the definition that you placed in your query refers to conditional (posterior) probabilities after observing the evidence, please look at the methods that get the value of the node.

I hope this helps,

Marek
Post Reply