diff options
-rw-r--r-- | beliefs/factors/bernoulli_and_cpd.py | 3 | ||||
-rw-r--r-- | beliefs/factors/bernoulli_or_cpd.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/beliefs/factors/bernoulli_and_cpd.py b/beliefs/factors/bernoulli_and_cpd.py index fdb0c25..adf5ed5 100644 --- a/beliefs/factors/bernoulli_and_cpd.py +++ b/beliefs/factors/bernoulli_and_cpd.py @@ -20,7 +20,8 @@ class BernoulliAndCPD(TabularCPD): variable_card=2, parents=parents, parents_card=[2]*len(parents), - values=[]) + values=[], + state_names={var: ['False', 'True'] for var in [variable] + parents}) self._values = None @property diff --git a/beliefs/factors/bernoulli_or_cpd.py b/beliefs/factors/bernoulli_or_cpd.py index 12ee2f6..6e01cf9 100644 --- a/beliefs/factors/bernoulli_or_cpd.py +++ b/beliefs/factors/bernoulli_or_cpd.py @@ -20,7 +20,8 @@ class BernoulliOrCPD(TabularCPD): variable_card=2, parents=parents, parents_card=[2]*len(parents), - values=[]) + values=[], + state_names={var: ['False', 'True'] for var in [variable] + parents}) self._values = None @property |