BayesNetFragment.maxNonOneParam
- BayesNetFragment.maxNonOneParam()
- Returns:
The largest parameter different from 1 in the CPTs of the BayesNet, or 1 if all the parameters are 1
- Return type:
float
Example
import pyagrum as gum
bn = gum.fastBN("A->B->C")
bn.cpt("A").fillWith([0.2, 0.8])
bn.cpt("B").fillWith([1.0, 0.0, 0.3, 0.7])
fragment = gum.BayesNetFragment(bn)
fragment.installAscendants("B") # the CPT of C is not in the fragment
fragment.maxNonOneParam()
# 0.8
Class