Expand description
Causal Inference Engine — do-calculus, interventional distributions, and counterfactual reasoning over Gaussian structural equation models.
§Overview
This module implements a full causal inference pipeline built on directed acyclic graphs (DAGs) with Gaussian node semantics. The design follows Pearl’s do-calculus framework:
- Structural Causal Model (SCM) — each node is parameterised by a mean and a variance under a Gaussian structural equation model.
- Interventional inference (
do_calculus) — cuts incoming edges to the intervened node and propagates the fixed value through all directed paths to the target, accumulating linear causal effects. - Counterfactual inference (
counterfactual) — applies an intervention and conditions on observed evidence by adding a weighted correction from each evidence node to the target. - Average Causal Effect (
average_causal_effect) — contrasts interventional distributions to quantify treatment effects. - d-separation — checks whether two nodes are conditionally independent given a set of observed variables.
- Backdoor paths — enumerates confounding paths for identifiability analysis.
Structs§
- Causal
Edge - A directed edge in the causal graph carrying a linear strength coefficient.
- Causal
Graph - The underlying directed acyclic graph over causal nodes.
- Causal
Inference Engine - Production-grade causal inference engine.
- Causal
Node - A variable in the structural causal model parameterised by a Gaussian prior.
- Causal
Node Id - Opaque identifier for a node inside a
CausalGraph. - Causal
Stats - Summary statistics about the structure of a
CausalGraph. - Counterfactual
Query - A counterfactual query: what would
targetbe if we had appliedintervention, given that we observedevidence? - Inference
Result - The result returned by an inference query.
- Intervention
- A hard intervention: set node
nodeto exactlyvalue(written do(X = value)).
Enums§
- Causal
Edge Type - Semantic classification for an edge in a
CausalGraph. - Causal
Error - Errors that can be produced by the
CausalInferenceEngine.