LoopyWeightedSampling.isTarget
- LoopyWeightedSampling.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.LoopyWeightedSampling(bn)
ie.isTarget("A")
# True
ie.eraseTarget("A")
ie.isTarget("A")
# False
Class