pyhgf.updates.prediction.continuous.predict_mean#
- pyhgf.updates.prediction.continuous.predict_mean(attributes, edges, node_idx)[source]#
Compute the expected mean of a continuous state node.
The expected mean at time \(k\) for a state node \(a\) with optional value parent(s) \(b\) is in [1] given by:
\[\hat{\mu}_a^{(k)} = \lambda_a \mu_a^{(k-1)} + P_a^{(k)}\]where \(P_a^{(k)}\) is the drift rate (the total predicted drift of the expected mean, which sums the tonic and - optionally - phasic drifts). The variable \(lambda_a\) represents the state’s autoconnection strength, with \(\lambda_a \in [0, 1]\). When \(\lambda_a = 1\), the node is performing a Gaussian Random Walk using the value \(P_a^{(k)}\) as total drift rate. When \(\lambda_a < 1\), the state will revert back to the total mean \(M_a\), which is given by:
\[M_a = \frac{\rho_a + f\left(\hat{\mu}_b^{(k)}\right)} {1-\lambda_a},\]If \(\lambda_a = 0\), the node is not influenced by its own mean anymore, but by the value received by the value parent.
Hint
By combining one parameter \(\lambda_a \in [0, 1]\) and the influence of value parents, it is possible to implement both Gaussian Random Walks and Autoregressive Processes, without requiring specific coupling types.
- Parameters:
attributes (dict) – The attributes of the probabilistic network that contains the continuous state node.
edges (tuple[AdjacencyLists, ...]) – The edges of the probabilistic network as a tuple of
pyhgf.typing.Indexes. The tuple has the same length as the number of nodes. For each node, the index list value/volatility - parents/children.node_idx (int) – Index of the node that should be updated.
- Returns:
The new expected mean of the state node.
- Return type:
expected_mean
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