pywhy_graphs.AugmentedPAG#

class pywhy_graphs.AugmentedPAG(incoming_directed_edges=None, incoming_undirected_edges=None, incoming_bidirected_edges=None, incoming_circle_edges=None, directed_edge_name: str = 'directed', undirected_edge_name: str = 'undirected', bidirected_edge_name: str = 'bidirected', circle_edge_name: str = 'circle', **attr)[source]#

An augmented PAG.

An augmented PAG is a PAG that has been augmented with either F-nodes or S-nodes, or both. It is a Markov equivalence class of causal diagrams.

Parameters:
incoming_directed_edgesinput directed edges (optional, default: None)

Data to initialize directed edges. All arguments that are accepted by networkx.DiGraph are accepted.

incoming_undirected_edgesinput undirected edges (optional, default: None)

Data to initialize undirected edges. All arguments that are accepted by networkx.Graph are accepted.

incoming_bidirected_edgesinput bidirected edges (optional, default: None)

Data to initialize bidirected edges. All arguments that are accepted by networkx.Graph are accepted.

incoming_circle_edgesinput circular endpoint edges (optional, default: None)

Data to initialize edges with circle endpoints. All arguments that are accepted by networkx.DiGraph are accepted.

directed_edge_namestr

The name for the directed edges. By default ‘directed’.

undirected_edge_namestr

The name for the undirected edges. By default ‘undirected’.

bidirected_edge_namestr

The name for the bidirected edges. By default ‘bidirected’.

circle_edge_namestr

The name for the circle edges. By default ‘circle’.

f_nodesList[Node], optional

List of corresponding nodes that are F nodes, by default None.

Notes

F-nodes are just nodes that are added to a causal graph, and represent an “augmentation” of the original causal graph to handle interventions. Each F-node is mapped to a 2-tuple representing the index pair of intervention-targets.

If the intervention targets are unknown, then the 2-tuple contains integer indices representing the index of an interventional distribution. This is called \(\sigma\) in [1].

Edge Type Subgraphs

Different edge types in an AugmentedPAG are represented exactly as they are in a pywhy_graphs.PAG.

F-nodes

Interventions are represented by special nodes, known as F-nodes. See [1], or [2] for details.

F-nodes are represented in pywhy-graphs as a tuple as ('F', <index>), where index is just a random index number. Each F-node is mapped to the intervention-set that they are applied on. For example in the graph \(('F', 0) \rightarrow X \rightarrow Y\), ('F', 0) is the F-node added that models an intervention on X. Each intervention-set is a set of regular nodes in the causal graph.

S-nodes

Different domains and environments are represented by special nodes, known as S-nodes. See [3] for details.

S-nodes are represented in pywhy-graphs as a tuple as ('S', <index>), where index is just a random index number. Each F-node is mapped to the intervention-set that they are applied on. For example in the graph \(('F', 0) \rightarrow X \rightarrow Y\), ('F', 0) is the F-node added that models an intervention on X. Each intervention-set is a set of regular nodes in the causal graph.

References