BNMixture.zeroBNs
- BNMixture.zeroBNs()
- Returns:
The names of the BNs in the model that have weight with value 0.
- Return type:
Set[str]
Example
import pyagrum as gum
import pyagrum.bnmixture as bnm
mix = bnm.BNMixture()
mix.add("bn1", gum.fastBN("A->B->C"), w=0.6)
mix.add("bn2", gum.fastBN("A->B;A->C"), w=0.4)
mix.setWeight("bn2", 0)
mix.zeroBNs()
# {'bn2'}
Class