WeightedSampling.eraseEvidence
- WeightedSampling.eraseEvidence(*args)
Remove the evidence, if any, corresponding to the node Id or name.
- Parameters:
id (
int) – a node IdnodeName (
str) – a node name
- Raises:
pyagrum.NotFound – If nodeName is not the name of a node (an unknown node Id is not an error: nothing is removed)
- Return type:
None
Example
import pyagrum as gum
bn = gum.fastBN("A->B<-C", uniform=True)
ie = gum.WeightedSampling(bn)
ie.setEvidence({"A": 1, "C": 0})
ie.eraseEvidence("A")
ie.hardEvidenceNodes()
# {2}
Class
Overridden in