pyhgf.utils.add_edges#
- pyhgf.utils.add_edges(attributes, edges, kind='value', parent_idxs=typing.Union[int, list[int]], children_idxs=typing.Union[int, list[int]], coupling_strengths=1.0, coupling_fn=(None,))[source]#
Add a value or volatility coupling link between a set of nodes.
- Parameters:
attributes (dict) – Attributes of the neural network.
edges (tuple[AdjacencyLists, ...]) – Edges of the neural network.
kind – The kind of coupling can be “value” or “volatility”.
parent_idxs – The index(es) of the parent node(s).
children_idxs – The index(es) of the children node(s).
coupling_strengths (float | list[float] | tuple[float]) – The coupling strength between the parents and children.
coupling_fn (tuple[Callable | None, ...]) – Coupling function(s) between the current node and its value children. It has to be provided as a tuple. If multiple value children are specified, the coupling functions must be stated in the same order of the children. Note: if a node has multiple parents nodes with different coupling functions, a coupling function should be indicated for all the parent nodes. If no coupling function is stated, the relationship between nodes is assumed linear.
- Return type:
tuple