ShaferShenoyInference.isTarget
- ShaferShenoyInference.isTarget(*args)
- Parameters:
variable (
int) – a node IdnodeName (
str) – a node name
- Returns:
True if variable is a (marginal) target
- Return type:
bool- Raises:
pyagrum.NotFound – If the node does not belong to the Bayesian network
pyagrum.UndefinedElement – If node Id is not in the Bayesian network
Example
import pyagrum as gum
bn = gum.fastBN("A->B->C")
ie = gum.ShaferShenoyInference(bn)
ie.addTarget("A")
ie.isTarget("A")
# True
ie.isTarget("B")
# False
Class