WeightedSampling.H
- WeightedSampling.H(*args)
- Parameters:
X (
int) – a node IdnodeName (
str) – a node name
- Returns:
the computed Shanon’s entropy of a node given the observation
- Return type:
float
Example
import pyagrum as gum
bn = gum.fastBN("A->B<-C", uniform=True)
ie = gum.WeightedSampling(bn)
ie.addEvidence("A", 1)
ie.makeInference()
ie.H("A") == 0 # A is observed
# True
ie.H("B") > 0
# True
Class
Overridden in