pywhy_graphs.classes.timeseries.StationaryTimeSeriesPAG#

class pywhy_graphs.classes.timeseries.StationaryTimeSeriesPAG(incoming_directed_edges=None, incoming_circle_edges=None, incoming_bidirected_edges=None, incoming_undirected_edges=None, circle_edge_name: str = 'circle', directed_edge_name: str = 'directed', bidirected_edge_name: str = 'bidirected', undirected_edge_name: str = 'undirected', stationary: bool = True, **attr)[source]#
property bidirected_edge_name: str#

Name of the bidirected edge internal graph.

property bidirected_edges: Mapping#

EdgeView of the bidirected edges.

property circle_edge_name: str#

Name of the bidirected edge internal graph.

property circle_edges: Mapping#

EdgeView of the directed edges.

property directed_edge_name: str#

Name of the directed edge internal graph.

property directed_edges: Mapping#

EdgeView of the directed edges.

orient_uncertain_edge(u: int | float | str | Any, v: int | float | str | Any) None[source]#

Orient undirected edge into an arrowhead.

If there is an undirected edge u - v, then the arrowhead will orient u -> v. If the correct order is v <- u, then simply pass the arguments in different order.

Parameters:
unode

The parent node

vnode

The node that ‘u’ points to in the graph.

possible_children(n: int | float | str | Any) Iterator[int | float | str | Any][source]#

Return an iterator over children of node n.

Children of node ‘n’ are nodes with a directed edge from ‘n’ to that node. For example, ‘n’ -> ‘x’, ‘n’ -> ‘y’. Nodes only connected via a bidirected edge are not considered children: ‘n’ <-> ‘y’.

Parameters:
nnode

A node in the causal DAG.

Returns:
childrenIterator

An iterator of the children of node ‘n’.

possible_parents(n: int | float | str | Any) Iterator[int | float | str | Any][source]#

Return an iterator over parents of node n.

Parents of node ‘n’ are nodes with a directed edge from ‘n’ to that node. For example, ‘n’ <- ‘x’, ‘n’ <- ‘y’. Nodes only connected via a bidirected edge are not considered parents: ‘n’ <-> ‘y’.

Parameters:
nnode

A node in the causal DAG.

Returns:
parentsIterator

An iterator of the parents of node ‘n’.

sub_bidirected_graph() Graph[source]#

Sub-graph of just the bidirected edges.

sub_circle_graph() Graph[source]#

Sub-graph of just the circle edges.

sub_directed_graph() DiGraph[source]#

Sub-graph of just the directed edges.

sub_undirected_graph() Graph[source]#

Sub-graph of just the undirected edges.

property undirected_edge_name: str#

Name of the undirected edge internal graph.

property undirected_edges: Mapping#

EdgeView of the undirected edges.