pyhgf.updates.vectorized.volatile.vectorized_layer_value_prediction_error#

pyhgf.updates.vectorized.volatile.vectorized_layer_value_prediction_error(layer)[source]#

Compute the value prediction error for all nodes in a layer.

This is the vectorized equivalent of pyhgf.updates.prediction_error.volatile.volatile_node_value_prediction_error().

Parent-count normalisation is applied in the prediction step instead (the drift is divided by n_parents before setting expected_mean), so the PE carries the full residual without further scaling.

Parameters:

layer (LayerState) – Current layer with mean and expected_mean set.

Returns:

Updated layer state with value_prediction_error set.

Return type:

LayerState