Exemple #1
0
 def test_remove_cpds(cbn_3node: CausalBayesianNetwork) -> None:
     cbn_3node.remove_cpds("S")
     assert "S" not in cbn_3node.model
     assert cbn_3node.get_cpds("S") is None
     cbn_3node.remove_cpds("D")
     cbn_3node.remove_cpds("U")
Exemple #2
0
 def remove_node(cbn_3node: CausalBayesianNetwork) -> None:
     cbn_3node.remove_node("S")
     cbn_3node.remove_cpds("D")
     cbn_3node.remove_cpds("U")
     assert cbn_3node.nodes == []