pyhgf.utils.add_edges#
- pyhgf.utils.add_edges(attributes: Dict, edges: Tuple[AdjacencyLists, ...], kind='value', parent_idxs=typing.Union[int, typing.List[int]], children_idxs=typing.Union[int, typing.List[int]], coupling_strengths: float | List[float] | Tuple[float] = 1.0, coupling_fn: Tuple[Callable | None, ...] = (None,)) Tuple [source]#
Add a value or volatility coupling link between a set of nodes.
- Parameters:
- attributes
Attributes of the neural network.
- edges
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
The coupling strength between the parents and children.
- coupling_fn
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.