LoopyImportanceSampling.hasHardEvidence
- LoopyImportanceSampling.hasHardEvidence(*args)
- Parameters:
id (
int) – a node IdnodeName (
str) – a node name
- Returns:
True if node has received a hard evidence
- Return type:
bool- Raises:
pyagrum.NotFound – If nodeName is not the name of a node (an unknown node Id is not an error: the result is False)
Example
import pyagrum as gum
bn = gum.fastBN("A->B<-C", uniform=True)
ie = gum.LoopyImportanceSampling(bn)
ie.addEvidence("A", 1)
ie.addEvidence("C", 0)
ie.hasHardEvidence("A"), ie.hasHardEvidence("C")
# (True, True)
Class