causal-learn tutorial series

causal-learn
Causal Discovery
Python
Graphs
A hands-on tutorial series for causal discovery with PC, FCI, CD-NOD, GES, LiNGAM, functional causal models, permutation methods, stability checks, and reporting.

causal-learn is the tutorial track for causal discovery: learning candidate graph structures while staying honest about assumptions, equivalence classes, hidden confounding, and stability.

Candidate causal graph learned in the causal-learn tutorial series
Figure: A final candidate graph from the causal-learn case study, used to discuss discovery, constraints, stability, and interpretation (adapted from Tutorial 16: End-To-End Causal Discovery Case Study).

Tutorial Sequence

00: Environment And Library Tour

Sets up causal-learn, introduces the discovery workflow, and uses a small teaching DAG to connect graph structure with data and evaluation metrics.

02: Synthetic Data For Causal Discovery

Creates controlled simulation settings so discovery algorithms can be studied under known truth, hidden confounding, nonstationarity, and noisy mechanisms.

03: Independence Tests

Explains the conditional-independence tests that drive constraint-based discovery, including Fisher-Z, discrete tests, conditioning sets, and sample-size sensitivity.

04: PC Algorithm For Continuous Data

Applies the PC algorithm to continuous data, showing how alpha choices, sample size, nonlinearity, and evaluation metrics affect the learned graph.

06: FCI For Latent Confounders

Introduces FCI for settings with hidden common causes, comparing observed-variable PC results with PAG-style output that represents latent ambiguity.

07: CD-NOD For Nonstationary Data

Uses changing environments and distribution shifts to study CD-NOD, mechanism changes, pooled versus environment-aware discovery, and stability across regimes.

08: Score-Based Discovery With GES

Introduces score-based search with GES, BIC-style penalties, mechanism misspecification, and comparisons against constraint-based graph recovery.

09: Exact Search And Score Functions

Explores exact-search ideas and score functions, emphasizing why exhaustive graph search is informative for small problems but difficult to scale.

13: Time-Series Causal Discovery

Moves discovery into temporal data, using lagged relationships, Granger-style structure, autocorrelation, threshold sensitivity, and temporal graph interpretation.