pyhgf.updates.prediction_error.inputs.continuous.continuous_input_volatility_prediction_error#

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

Store noise prediction error from an input node.

Input nodes can have noise parents, and therefore should compute the equivalent of a volatility prediction error (VOPE): a noise prediction error (NOPE). The volatility parent will use the NOPE value the same way that it uses VOPE values. Note that the effective precision \(\gamma_j^{(k)}\) is fixed to 1 so this equivalence applies.

The noise prediction error \(\epsilon_j^{(k)}\) of an input node \(j\) is given by:

\[\epsilon_j^{(k)} = \frac{\hat{\pi}_j^{(k)}}{\pi_{vapa}^{(k)}} + \hat{\pi}_j^{(k)} \left( u^{(k)} - \mu_{vapa}^{(k)} \right)^2 - 1\]

Note that, because we are working with continuous input nodes, \(\epsilon_j^{(k)}\) is not a function of the value prediction error but uses the posterior of the value parent(s).

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.

node_idx

Pointer to the input node.

Returns:
attributes

The 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