pyhgf.updates.prediction_error.exponential.prediction_error_update_exponential_family_fixed#
- pyhgf.updates.prediction_error.exponential.prediction_error_update_exponential_family_fixed(attributes, node_idx, sufficient_stats_fn, **args)[source]#
Update the parameters of an exponential family distribution.
Assuming that \(nu\) is fixed, updating the hyperparameters of the distribution is given by:
\[\xi \leftarrow \xi + \frac{1}{\nu + 1}(t(x)-\xi)\]- Parameters:
- attributes
The attributes of the probabilistic nodes.
- node_idx
Pointer to the value parent node that will be updated.
- sufficient_stats_fn
Compute the sufficient statistics of the probability distribution. This should be one of the method implemented in the distribution class in
pyhgf.math.Normal
, for a univariate normal.
- Returns:
- attributes
The updated attributes of the probabilistic nodes.
- Parameters:
attributes (Dict)
node_idx (int)
sufficient_stats_fn (Callable)
- Return type:
Dict[int | str, Dict]
References
[1]Mathys, C., & Weber, L. (2020). Hierarchical Gaussian Filtering of Sufficient Statistic Time Series for Active Inference. In Active Inference (pp. 52–58). Springer International Publishing. https://doi.org/10.1007/978-3-030-64919-7_7