pyhgf.updates.vectorized.volatile.vectorized_layer_prediction_error#
- pyhgf.updates.vectorized.volatile.vectorized_layer_prediction_error(layer, n_parents, params, update_type='eHGF', time_step=1.0)[source]#
Compute prediction errors and apply the volatility-level posterior update.
This is the vectorized equivalent of
pyhgf.updates.prediction_error.volatile.volatile_node_prediction_error(). It first computes value and volatility prediction errors, then dispatches to the appropriate volatility-level posterior update depending on update_type.- Parameters:
layer (LayerState) – Current layer with
meanandexpected_meanset.n_parents (int) – Number of value parents for this layer (for normalization).
params (LayerParams) – Layer parameters (needed by all volatility posterior updates).
update_type (str) – One of
"eHGF"(default),"standard", or"unbounded".time_step (float) – Current time step. Only required when
update_type="unbounded".
- Returns:
Updated layer state with prediction errors and volatility posterior.
- Return type:
LayerState