DoWhy is a mature Python library for causal inference that implements a systematic four-step workflow: model (encode causal graph), identify (derive estimand), estimate (compute causal effect), and refute (validate robustness). The library supports two major frameworks: (1) classical potential-outcomes-based estimation with ATE/ATT/CATE via backdoor, frontdoor, instrumental variables, and mediation analysis, leveraging multiple estimators including linear regression, propensity score methods, doubly robust, instrumental variable, regression discontinuity, and integrations with EconML and CausalML; (2) Graphical Causal Model (GCM) based inference for what-if analysis, counterfactual sampling, distribution change attribution, arrow strength, intrinsic causal influence, anomaly attribution, and root cause analysis. The architecture is modular with abstract base classes for estimators, refuters, interpreters, and GCM components. The main entry point is the CausalModel class, which orchestrates identification, estimation, and refutation via a consistent API. Key dependencies include scikit-learn, statsmodels, networkx, sympy, pandas, numpy, and optional integrations with Torch, EconML, Causal-learn, and TabPFN. The library is production-ready with comprehensive test suites, CI/CD, and extensive documentation, and is actively maintained with a large contributor base.
This repository is the `lingam` Python package, a comprehensive, research-oriented library for causal discovery from observational data using LiNGAM (Linear Non-Gaussian Acyclic Model) and its numerous extensions. It implements over 20 algorithms, including DirectLiNGAM, ICALiNGAM, VAR-LiNGAM, RCD, CAM-UV, RESIT, LiM, mLiNGAM, GroupLiNGAM, MultiGroup variants, and more. The library provides a consistent API where each algorithm exposes `fit()` on a data matrix, followed by properties like `causal_order_` and `adjacency_matrix_`, and all support bootstrap-based stability analysis via a shared `BootstrapMixin`. Key contributions include handling of latent confounders, time series, missing data, mixed data types, and multiple datasets, alongside utilities for causal effect estimation, visualization, model evaluation, and synthetic data generation. The code is well-structured, uses standard scientific Python dependencies (numpy, scipy, scikit-learn, graphviz), and includes a thorough test suite and extensive Jupyter notebook tutorials.