CredalNet.src_bn
- CredalNet.src_bn()
- Returns:
Returns a constant reference to the original BayesNet (used as a DAG, it’s CPTs does not matter).
- Return type:
Example
import pyagrum as gum
bn = gum.fastBN("A->B")
bnmin, bnmax = gum.BayesNet(bn), gum.BayesNet(bn)
bnmin.cpt("A").fillWith([0.2, 0.6])
bnmax.cpt("A").fillWith([0.4, 0.8])
bnmin.cpt("B")[:] = [[0.1, 0.7], [0.5, 0.3]]
bnmax.cpt("B")[:] = [[0.3, 0.9], [0.7, 0.5]]
cn = gum.CredalNet(bnmin, bnmax)
cn.intervalToCredal()
sorted(cn.src_bn().names())
# ['A', 'B']
cn.src_bn().cpt("A").tolist() # the lower probabilities
# [0.2, 0.6]
Class