BootstrapMixture.weight
- BootstrapMixture.weight(name)
- Parameters:
name (
str) – Name of the BN.- Returns:
The weight of the BN with name
name.- Return type:
float- Raises:
pyagrum.NotFound – If the given name doesn’t correspond to the name of a BN in the model.
Example
import pyagrum as gum
import pyagrum.bnmixture as bnm
mix = bnm.BootstrapMixture("ref", gum.fastBN("A->B->C"))
mix.add("bn1", gum.fastBN("A->B->C"))
mix.add("bn2", gum.fastBN("A->B;A->C"))
mix.weight("bn1")
# 1
Class