ShaferShenoyMRFInference.addTarget
- ShaferShenoyMRFInference.addTarget(*args)
Add a marginal target to the list of targets.
- Parameters:
target (
int) – a node IdnodeName (
str) – a node name
- Raises:
pyagrum.UndefinedElement – If target is not a NodeId in the Bayes net
- Return type:
None
Example
import pyagrum as gum
mrf = gum.fastMRF("A--B;B--C;C--D")
ie = gum.ShaferShenoyMRFInference(mrf)
ie.addTarget("B")
sorted(ie.targets())
# [1]
ie.isTarget("A")
# False
Class