pyhgf.updates.prediction_error.inputs.continuous.continuous_input_value_prediction_error#

pyhgf.updates.prediction_error.inputs.continuous.continuous_input_value_prediction_error(attributes: Dict, edges: Tuple[AdjacencyLists, ...], time_step: float, node_idx: int) Dict[source]#

Store value prediction error and expected precision from an input node.

The value prediction error \(\delta_j^{(k)}\) of an input node \(j\) at time \(k\) is given by:

\[\delta_j^{(k)} = u^{(k)} - \hat{\mu_j}^{(k)}\]

The expected precision \(\hat{\pi}_j^{(k)}\) of an input node is the sum of the tonic and phasic volatility, which is given by:

\[\hat{\pi}_j^{(k)} = \frac{1}{\zeta} * \frac{1}{e^{\kappa_j \mu_a}}\]

where \(\zeta\) is the input precision (in real space).

Parameters:
attributes

The attributes of the probabilistic nodes.

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.

time_step

The time interval between the previous time point and the current time point.

node_idx

Pointer to the input node.

Returns:
attributes

The attributes of the probabilistic nodes.

Notes

This update step is similar to the one used for the state node, except that it uses the observed value instead of the mean of the child node, and the expected mean of the parent node instead of the expected mean of the child node.

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