pyhgf.updates.posterior.categorical.categorical_state_update#
- pyhgf.updates.posterior.categorical.categorical_state_update(attributes: Dict, node_idx: int, edges: Tuple[AdjacencyLists, ...], **args) Dict [source]#
Update the categorical input node given an array of binary observations.
This function should be called after the update of the implied binary HGFs. It receives a None as the boolean observations are passed to the binary inputs directly. This update uses the expected probability of the binary input to update an implied Dirichlet distribution.
- Parameters:
- attributes
The attributes of the probabilistic nodes.
- .. note::
“psis” is the value coupling strength. It should have the same length as the volatility parents’ indexes. “volatility_coupling” is the volatility coupling strength. It should have the same length as the volatility parents’ indexes.
- node_idx
Pointer to the node that needs to be updated.
- edges
The edges of the probabilistic nodes as a tuple of
pyhgf.typing.Indexes
. The tuple has the same length as the node number. For each node, the index lists the value and volatility parents and children.
- Returns:
- attributes
The updated parameters structure.
See also
binary_input_update
,continuous_input_update