pyhgf.updates.vectorized.volatile.vectorized_layer_prediction#

pyhgf.updates.vectorized.volatile.vectorized_layer_prediction(child_state, parent_state, weights, params, time_step, coupling_fn=<PjitFunction of <function tanh>>, parent_has_constant=False, has_volatility_parent=True, is_input_layer=False)[source]#

Predict expected mean/precision for all nodes in child layer (volatile node).

This implements the full volatile node prediction with both value level and volatility level predictions.

Parameters:
  • child_state (LayerState) – Current state of the child layer (being predicted).

  • parent_state (LayerState) – Current state of the parent layer (predictor).

  • weights (Array) – Weight matrix connecting child to parent, shape (n_children, n_parents) or (n_children, n_parents + 1) when the parent layer includes a constant input node.

  • params (LayerParams) – Layer parameters for the child layer.

  • time_step (float) – Time step for the prediction.

  • coupling_fn (Callable) – Coupling function applied to parent means (default: tanh).

  • parent_has_constant (bool) – If True, the parent layer has a constant input node (mean = 1.0) appended to its activations. The last column of weights carries the bias connections.

  • has_volatility_parent (bool) – If True (default), the layer has an implied internal volatility parent whose state (mean_vol, precision_vol) is predicted and updated. If False, the volatility level is frozen: mean_vol and precision_vol are not propagated forward, and only tonic_volatility drives the expected precision for the value level.

  • is_input_layer (bool) – If True, the layer is treated as an observed input/leaf — it does not undergo a Gaussian random walk between observations. The tonic_volatility contribution to the value-level expected precision is skipped and expected_precision is set to the prior precision, mirroring the continuous-node treatment in pyhgf.updates.prediction.continuous.continuous_node_prediction().

Returns:

Updated child layer state with expected values filled in.

Return type:

LayerState