cdt15/lingam
Python package for causal discovery based on LiNGAM.
What it solves
LiNGAM provides a way to estimate structural equation models or linear Bayesian networks. It specifically addresses the challenge of causal discovery—determining the causal relationships between variables—by leveraging the non-Gaussianity of the data to identify the direction of causality.
How it works
The library implements various algorithms (such as DirectLiNGAM, ICA-based LiNGAM, and RESIT) that analyze data to find a causal ordering of variables. By assuming the data is linear and non-Gaussian, the tool can distinguish between cause and effect in ways that standard correlation-based methods cannot. It can produce a causal order and an adjacency matrix representing the network of influences.
Who it’s for
This tool is designed for researchers and data scientists working with structural equation modeling, Bayesian networks, and causal inference, particularly those dealing with continuous, non-Gaussian data.
Highlights
- Diverse Algorithm Support: Includes implementations for DirectLiNGAM, GroupDirectLiNGAM, and RESIT.
- Time Series Capability: Supports causal discovery for time series via VAR-LiNGAM and VARMA-LiNGAM.
- Handling Complex Data: Provides methods for longitudinal data, multiple datasets, and mixed data types.
- Robustness: Includes algorithms like ParceLiNGAM and RCD to handle latent confounders and unobserved variables.
Related
- Project
pgmpy/pgmpyA Python library for causal and probabilistic reasoning using graphical models, providing tools for structure learning, parameter estimation, and causal inference.
- Project
erdogant/bnlearnbnlearn is a Python library for learning, parameterising, and querying Bayesian networks. It supports structure discovery (various scores and search methods), CPT estimation, causal inference (do‑calculus), synthetic data generation, and visualisation, all wrapped in a simple API.
- Project
mckinsey/causalnexA toolkit for causal reasoning and "what-if" analysis using Bayesian Networks to identify causal relationships and estimate the impact of interventions.
- Project
pymc-labs/CausalPyCausalPy is a Python library for Bayesian‑first causal inference in quasi‑experimental settings. It implements methods such as difference‑in‑differences, synthetic control, regression discontinuity, and instrumental variables, offering posterior‑based effect summaries, credible intervals, ROPE analysis, and publication‑quality plots. The package builds on PyMC 6, works with Python 3.12+, and provides both Bayesian and OLS options for estimation.
- Project
py-why/dowhyDoWhy is a Python library for end‑to‑end causal inference. It lets you define a causal graph, automatically identifies the causal effect, estimates it with a variety of statistical methods, and runs refutation tests to check robustness. The library also supports graphical causal models for root‑cause analysis, counterfactuals, and interventional sampling. Install via `pip install dowhy` and follow the four‑step workflow (model → identify → estimate → refute).