pyhgf.model.add_categorical_state#

pyhgf.model.add_categorical_state(network, n_nodes, node_parameters, additional_parameters)[source]#

Add categorical state node(s) to a network.

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

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

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

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

Returns:

The updated neural network.

Return type:

network