diff options
author | Cathy Yeh <cathy@driver.xyz> | 2018-01-18 21:57:50 -0800 |
---|---|---|
committer | Cathy Yeh <cathy@driver.xyz> | 2018-01-18 21:57:50 -0800 |
commit | 2366e92bdb9c81bc2bd7132a00ed5c16a5160c5e (patch) | |
tree | fc71d343eec17b59d8af81eb768e4fe2eab167c2 /beliefs/factors/bernoulli_or_cpd.py | |
parent | 65d822247e30b6e104a8c09d3b930487b9f20a58 (diff) | |
parent | c93c352b2f68a2bbcde2241e61d9fb52504a67a9 (diff) | |
download | beliefs-2366e92bdb9c81bc2bd7132a00ed5c16a5160c5e.tar.gz beliefs-2366e92bdb9c81bc2bd7132a00ed5c16a5160c5e.tar.bz2 beliefs-2366e92bdb9c81bc2bd7132a00ed5c16a5160c5e.zip |
Merge branch 'generic_discrete_factor'. Implements explicit discrete factor methodsv0.1.0
Diffstat (limited to 'beliefs/factors/bernoulli_or_cpd.py')
-rw-r--r-- | beliefs/factors/bernoulli_or_cpd.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/beliefs/factors/bernoulli_or_cpd.py b/beliefs/factors/bernoulli_or_cpd.py index 12ee2f6..b5e6ae5 100644 --- a/beliefs/factors/bernoulli_or_cpd.py +++ b/beliefs/factors/bernoulli_or_cpd.py @@ -12,15 +12,17 @@ class BernoulliOrCPD(TabularCPD): """ def __init__(self, variable, parents=[]): """ - Args: - variable: int or string - parents: optional, list of int and/or strings + Args + variable: int or string + parents: list, + (optional) list of int and/or strings """ super().__init__(variable=variable, variable_card=2, parents=parents, parents_card=[2]*len(parents), - values=[]) + values=None, + state_names={var: ['False', 'True'] for var in [variable] + parents}) self._values = None @property |