pyhgf.updates.posterior.continuous.continuous_node_posterior_update_ehgf#

pyhgf.updates.posterior.continuous.continuous_node_posterior_update_ehgf(attributes: Dict, node_idx: int, edges: Tuple[AdjacencyLists, ...], **args) Dict[source]#

Update the posterior of a continuous node using the eHGF update.

The eHGF posterior update is a two-step process: 1. Update the posterior mean and assume that the posterior precision is equal to the expected precision. 2. Update the posterior precision.

Note

By updating the mean first, and approximating the precision using the expected, precision, this update step often perform better than the regular update and limit the occurence of negative precision that cause the model to fail under some circumstances

Parameters:
attributes

The attributes of the probabilistic nodes.

node_idx

Pointer to the node that needs to be updated. After continuous updates, the parameters of value and volatility parents (if any) will be different.

edges

The edges of the probabilistic nodes as a tuple of pyhgf.typing.Indexes. The tuple has the same length as node number. For each node, the index list value and volatility parents and children.

Returns:
attributes

The updated attributes of the probabilistic nodes.

References

[1]

Weber, L. A., Waade, P. T., Legrand, N., Møller, A. H., Stephan, K. E., & Mathys, C. (2023). The generalized Hierarchical Gaussian Filter (Version 1). arXiv. https://doi.org/10.48550/ARXIV.2305.10937