pyhgf.updates.vectorised.continuous.vectorised_continuous_volatility_prediction_error#

pyhgf.updates.vectorised.continuous.vectorised_continuous_volatility_prediction_error(layer)[source]#

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

This is the vectorised equivalent of pyhgf.updates.prediction_error.continuous.continuous_node_volatility_prediction_error():

\[\Delta_a^{(k)} = \frac{\tilde{\pi}_a^{(k)}}{\pi_a^{(k)}} + \tilde{\pi}_a^{(k)} \left( \delta_a^{(k)} \right)^2 - 1.\]

The nodalised backend divides by the number of volatility parents; the vectorised layer topology allows at most one volatility parent per layer, so no division is applied.

Parameters:

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

Returns:

Updated layer state with volatility_prediction_error set.

Return type:

LayerState