pyhgf.updates.vectorised.volatile.vectorised_layer_volatility_prediction_error#

pyhgf.updates.vectorised.volatile.vectorised_layer_volatility_prediction_error(layer)[source]#

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

This is the vectorised equivalent of pyhgf.updates.prediction_error.volatile.volatile_node_volatility_prediction_error().

Note that we are not dividing by the number of parents here, since volatile nodes only have one implied parent.

Parameters:

layer (LayerState) – Current layer. Must already carry an up-to-date value_prediction_error (set by vectorised_layer_value_prediction_error()).

Returns:

Updated layer state with volatility_prediction_error set.

Return type:

LayerState