diff options
author | Cathy Yeh <cathy@driver.xyz> | 2018-01-17 17:32:07 -0800 |
---|---|---|
committer | Cathy Yeh <cathy@driver.xyz> | 2018-01-17 17:32:07 -0800 |
commit | 1a9286b0c1698fe5329a8e0b2a886f0a98286d2b (patch) | |
tree | 24942e42448c4175acbf1ab4e4e2d5d0cea44e88 /beliefs/inference | |
parent | d92ed9f14baead60fdd6c1d823345cc3ddd1bc04 (diff) | |
download | beliefs-1a9286b0c1698fe5329a8e0b2a886f0a98286d2b.tar.gz beliefs-1a9286b0c1698fe5329a8e0b2a886f0a98286d2b.tar.bz2 beliefs-1a9286b0c1698fe5329a8e0b2a886f0a98286d2b.zip |
compute_pi_agg -> compute_and_update_pi_agg, compute_lambda_agg -> compute_and_update_lambda_agg
Diffstat (limited to 'beliefs/inference')
-rw-r--r-- | beliefs/inference/belief_propagation.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/beliefs/inference/belief_propagation.py b/beliefs/inference/belief_propagation.py index acd93d4..e6e7b18 100644 --- a/beliefs/inference/belief_propagation.py +++ b/beliefs/inference/belief_propagation.py @@ -72,9 +72,9 @@ class BeliefPropagation: assert len(node.parents) + len(node.children) - 1 == len(parent_ids) + len(child_ids) if node_to_update_label_id not in evidence: - node.compute_pi_agg() + node.compute_and_update_pi_agg() logging.debug("belief propagation pi_agg: %s", np.array2string(node.pi_agg.values)) - node.compute_lambda_agg() + node.compute_and_update_lambda_agg() logging.debug("belief propagation lambda_agg: %s", np.array2string(node.lambda_agg.values)) for parent_id in parent_ids: @@ -130,7 +130,7 @@ class BeliefPropagation: child_ids = node_sending_msg.children if node_sending_msg.pi_agg.values is None: - node_sending_msg.compute_pi_agg() + node_sending_msg.compute_and_update_pi_agg() for child_id in child_ids: logging.debug("child: %s", str(child_id)) |