pyhgf.updates.prediction_error.nodes.dirichlet.dirichlet_node_prediction_error#

pyhgf.updates.prediction_error.nodes.dirichlet.dirichlet_node_prediction_error(edges: Tuple[AdjacencyLists, ...], attributes: Dict, node_idx: int, **args) Dict[int, Dict][source]#

Prediction error and update the child networks of a Dirichlet process node.

When receiving a new input, this node chose to either: 1. Allocate the value to a pre-existing cluster. 2. Create a new cluster.

The network always contains a temporary branch as the new cluster candidate. This branch is parametrized under the new observation to assess its likelihood and the previous clusters’ likelihood.

Parameters:
edges

The edges of the neural network as a tuple of pyhgf.typing.Indexes. The tuple has the same length as node number. For each node, the index lists the value/volatility parents/children.

attributes

The attributes of the probabilistic nodes.

node_idx

Pointer to the Dirichlet process input node.

Returns:
attributes

The attributes of the probabilistic nodes.