From d8b23fcb2337f1e518a59ea82e56fea13e294104 Mon Sep 17 00:00:00 2001 From: LegrandNico Date: Mon, 2 Oct 2023 12:55:27 +0200 Subject: [PATCH] simplify binary state node prediction --- src/pyhgf/updates/prediction/binary.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/pyhgf/updates/prediction/binary.py b/src/pyhgf/updates/prediction/binary.py index 7c6c87808..12f73f010 100644 --- a/src/pyhgf/updates/prediction/binary.py +++ b/src/pyhgf/updates/prediction/binary.py @@ -41,23 +41,8 @@ def predict_binary_state_node( # List the (unique) value parent of the value parent value_parent_idx = edges[node_idx].value_parents[0] - # Get the drift rate from the value parent of the value parent - driftrate = attributes[value_parent_idx]["rho"] - - # Look at the (optional) value parent's value parents - # and update the drift rate accordingly - if edges[value_parent_idx].value_parents is not None: - for ( - value_parent_value_parent_idx, - psi_parent, - ) in zip( - edges[value_parent_idx].value_parents, - attributes[value_parent_idx]["psis_parents"], - ): - driftrate += psi_parent * attributes[value_parent_value_parent_idx]["mu"] - # Estimate the new expected mean of the value parent and apply the sigmoid transform - muhat = attributes[value_parent_idx]["mu"] + time_step * driftrate + muhat = attributes[value_parent_idx]["muhat"] muhat = sigmoid(muhat) # Estimate the new expected precision of the value parent