pyhgf.utils.add_parent#

pyhgf.utils.add_parent(attributes, edges, index, coupling_type, mean)[source]#

Add a new continuous-state parent node to the attributes and edges of a network.

Parameters:
  • attributes (dict) – The attributes of the existing network.

  • edges (tuple[AdjacencyLists, ...]) – The edges of the existing network.

  • index (int) – The index of the node you want to connect a new parent node to.

  • coupling_type (str) – The type of coupling you want between the existing node and it’s new parent. Can be either “value” or “volatility”.

  • mean (float) – The mean value of the new parent node.

Returns:

  • attributes – The updated attributes of the existing network.

  • edges – The updated edges of the existing network.

Return type:

tuple[dict, tuple[AdjacencyLists, …]]