ShaferShenoyInference.eraseTarget
- ShaferShenoyInference.eraseTarget(*args)
Remove, if existing, the marginal target.
- Parameters:
target (
int) – a node IdnodeName (
str) – a node name
- Raises:
pyagrum.NotFound – If one of the node does not belong to the Bayesian network
pyagrum.UndefinedElement – If node Id is not in the Bayesian network
- Return type:
None
Example
import pyagrum as gum
bn = gum.fastBN("A->B->C")
ie = gum.ShaferShenoyInference(bn)
ie.addTarget("A")
ie.addTarget("C")
ie.eraseTarget("A")
sorted(ie.targets())
# [2]
Class