pyhgf.updates.vectorised.continuous.vectorised_continuous_prediction_error#

pyhgf.updates.vectorised.continuous.vectorised_continuous_prediction_error(layer, has_volatility_parent=False)[source]#

Compute the prediction errors a continuous layer sends to its parents.

This is the vectorised equivalent of pyhgf.updates.prediction_error.continuous.continuous_node_prediction_error(). The value prediction error is always computed; the volatility prediction error only when there is a volatility parent to consume it.

Parameters:
  • layer (LayerState) – Current layer with posterior mean and precision set.

  • has_volatility_parent (bool) – Whether the layer has a volatility-parent layer.

Returns:

Updated layer state with the prediction errors set.

Return type:

LayerState