pyhgf.updates.vectorised.volatile.vectorised_layer_volatility_posterior_ehgf#
- pyhgf.updates.vectorised.volatile.vectorised_layer_volatility_posterior_ehgf(layer, params, time_step, max_posterior_precision=10000000000.0, mean_field_updates=False)[source]#
EHGF volatility-level posterior update (mean first, then safe precision).
The eHGF update differs from the standard update in that it updates the mean first using the expected precision as an approximation, and then applies the safe precision update: the effective precision is recomputed from the just-updated posterior mean and the increment is floored at zero.
This is the vectorised equivalent of
pyhgf.updates.posterior.volatile.volatile_node_posterior_update_ehgf.volatile_node_posterior_update_ehgf().- Parameters:
layer (LayerState) – Current layer state with
volatility_prediction_errorset.params (LayerParams) – Layer parameters; provides the value level’s tonic volatility when one is allocated (
Noneenters the exponents as zero).time_step (float) – Current time step (needed to recompute the effective precision and to reconstruct the pre-prediction variance).
max_posterior_precision (float) – Upper bound applied to the volatility-level posterior precision. Default
1e10.mean_field_updates (bool) – Whether the prediction step ran the mean-field scheme. The reconstruction of the pre-prediction variance must subtract exactly the predicted volatility the prediction step added, so the MGF correction is dropped here when it was dropped there.
- Returns:
Updated layer state with
precision_volandmean_volset.- Return type: