CredalNet.get_binaryCPT_min
- CredalNet.get_binaryCPT_min()
The lower probabilities of the value 1 of each binary node.
- Returns:
for each node, the lower probabilities P(X=1 | pa(X)=j), one per instantiation j of its parents (empty before the computation of the binary credal net)
- Return type:
list[list[float]]
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()
cn.computeBinaryCPTMinMax()
[[round(p, 4) for p in x] for x in cn.get_binaryCPT_min()]
# [[0.6], [0.7, 0.3]]
Class