graphical_models.classes.mags.ancestral_graph.AncestralGraph.add_undirected
- AncestralGraph.add_undirected(i: Hashable, j: Hashable)[source]
Add an undirected edge between nodes i and j.
- Parameters
i – first endpoint of undirected edge.
j – second endpoint of undirected edge.
Examples
>>> from graphical_models import AncestralGraph >>> g = AncestralGraph() >>> g.add_undirected(1, 2) >>> g.undirected {frozenset({i, j})}