pyhgf.model.add_volatile_state#

pyhgf.model.add_volatile_state(network, n_nodes, value_parents, value_children, node_parameters, additional_parameters, coupling_fn)[source]#

Add a continuous state node with an implicit continuous volatility parent.

This node type combines a continuous node with an implicit volatility parent. The volatility parent modulates the child’s precision, enabling dynamic learning rates in predictive coding networks with fewer explicit nodes.

Note

Parameters relative to the volatility level (e.g., “mean_vol”, “expected_mean_vol”, etc.) are included in the node’s attributes using the suffix “_vol”.

Parameters:
  • network (Network) – The neural network to which the node(s) are added.

  • n_nodes (int) – The number of identical node(s) to add.

  • value_parents (tuple) – The value parents of the node(s), as a tuple of indexes and coupling strengths.

  • value_children (tuple) – The value children of the node(s), as a tuple of indexes and coupling strengths.

  • node_parameters (dict) – A dictionary of parameters overriding the node defaults.

  • additional_parameters (dict) – Additional parameters passed as keyword arguments, validated against the node defaults.

  • coupling_fn (tuple[Optional[Callable], ...]) – The coupling function(s) between the node(s) and their value children. None implies linear coupling.

Returns:

The updated neural network.

Return type:

network