Graph Examples

Examples from CausalFusion.

class Example(name: str, reference: str, graph: NxMixedGraph, description: str | None = None, verma_constraints: Sequence[VermaConstraint] | None = None, conditional_independencies: Sequence[DSeparationJudgement] | None = None, data: DataFrame | None = None, identifications: list[dict[str, list[Identification]]] | None = None, example_queries: list[Query] | None = None, generate_data: DataGenerator | None = None)[source]

An example graph packaged with certain pre-calculated data structures.

example_queries: list[Query] | None = None

Example queries are just to give an idea to a new user what might be interesting to use in the ID algorithm

generate_ate(*, num_samples: int, treatment: Variable, outcome: Variable, treatment_0: float = 0.0, treatment_1: float = 1.0) float[source]

Calculate the ATE for a single treatment/outcome pair.

frontdoor = NxMixedGraph(directed=<networkx.classes.digraph.DiGraph object>, undirected=<networkx.classes.graph.Graph object>)

Treatment: X Outcome: Y Adjusted: N/A

napkin = NxMixedGraph(directed=<networkx.classes.digraph.DiGraph object>, undirected=<networkx.classes.graph.Graph object>)

Treatment: X Outcome: Y

verma_1 = NxMixedGraph(directed=<networkx.classes.digraph.DiGraph object>, undirected=<networkx.classes.graph.Graph object>)

The Verma 1 example Treatment: V3 Outcome: V4 Reference: T. Verma and J. Pearl. 1990. “Equivalence and Synthesis of Causal Models.” In P. Bonissone et al., eds., Proceedings of the 6th Conference on Uncertainty in Artificial Intelligence. Cambridge, MA: AUAI Press, p. 257.