LoopyWeightedSampling.hasSoftEvidence
- LoopyWeightedSampling.hasSoftEvidence(*args)
- Parameters:
id (
int) – a node IdnodeName (
str) – a node name
- Returns:
True if node has received a soft 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.LoopyWeightedSampling(bn)
ie.addEvidence("A", 1) # sampling only accepts hard evidence
ie.hasSoftEvidence("A")
# False
Class