ランキングに戻る

mckinsey/causalnex

Pythoncausalnex.readthedocs.io

A Python library that helps data scientists to infer causation rather than observing correlation.

causal-inferencecausal-modelscausal-networksbayesian-networksbayesian-inferencemachine-learningdata-sciencecausalnex
スター成長
スター
2.5k
フォーク
289
週間成長
Issue
26
1k2k
2023年9月2024年8月2025年8月2026年7月
成果物PyPIpip install causalnex
README

[!IMPORTANT]

CausalNex is no longer actively maintained. As of 24th June 2026, CausalNex has reached end of life and has been discontinued.

McKinsey will continue to make this repository accessible strictly as a historical archive, but please be advised that the codebase has been discontinued and is no longer supported. Consequently, the project will not receive any future updates, bug-fixes, or security and vulnerability patches. Outstanding issues and pull requests will no longer be monitored or reviewed.

Pursuant to the applicable open-source license, CausalNex is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Any continued use, copying, modification, or distribution of this codebase is done entirely at the user's own risk, and McKinsey disclaims all liability arising from such use.

Theme Status
Latest Release PyPI version
Python Version Python Version
Documentation Build Documentation
License License
Code Style Code Style: Black

What is CausalNex?

"A toolkit for causal reasoning with Bayesian Networks."

CausalNex aims to become one of the leading libraries for causal reasoning and "what-if" analysis using Bayesian Networks. It helps to simplify the steps:

  • To learn causal structures,
  • To allow domain experts to augment the relationships,
  • To estimate the effects of potential interventions using data.

Why CausalNex?

CausalNex is built on our collective experience to leverage Bayesian Networks to identify causal relationships in data so that we can develop the right interventions from analytics. We developed CausalNex because:

  • We believe leveraging Bayesian Networks is more intuitive to describe causality compared to traditional machine learning methodology that are built on pattern recognition and correlation analysis.
  • Causal relationships are more accurate if we can easily encode or augment domain expertise in the graph model.
  • We can then use the graph model to assess the impact from changes to underlying features, i.e. counterfactual analysis, and identify the right intervention.

In our experience, a data scientist generally has to use at least 3-4 different open-source libraries before arriving at the final step of finding the right intervention. CausalNex aims to simplify this end-to-end process for causality and counterfactual analysis.

What are the main features of CausalNex?

The main features of this library are:

  • Use state-of-the-art structure learning methods to understand conditional dependencies between variables
  • Allow domain knowledge to augment model relationship
  • Build predictive models based on structural relationships
  • Fit probability distribution of the Bayesian Networks
  • Evaluate model quality with standard statistical checks
  • Simplify how causality is understood in Bayesian Networks through visualisation
  • Analyse the impact of interventions using Do-calculus

How do I install CausalNex?

CausalNex is a Python package. To install it, simply run:

pip install causalnex

Use all for a full installation of dependencies:

pip install "causalnex[all]"

See more detailed installation instructions, including how to setup Python virtual environments, in our installation guide and get started with our tutorial.

How do I use CausalNex?

You can find the documentation for the latest stable release here. It explains:

Note: You can find the notebook and markdown files used to build the docs in docs/source.

How do I upgrade CausalNex?

We use SemVer for versioning. The best way to upgrade safely is to check our release notes for any notable breaking changes.

How do I cite CausalNex?

You may click "Cite this repository" under the "About" section of this repository to get the citation information in APA and BibTeX formats.

What licence do you use?

See our LICENSE for more detail.

We're hiring!

Do you want to be part of the team that builds CausalNex and other great products at QuantumBlack? Take a look at our open positions and see if you're a fit.

関連リポジトリ
py-why/dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.

PythonPyPIMIT Licensecausal-inferencemachine-learning
pywhy.org/dowhy
8.2k1k
uber/causalml

Uplift modeling and causal inference with machine learning algorithms

PythonPyPIOtherincubationmachine-learning
5.9k867
py-why/EconML

ALICE (Automated Learning and Intelligence for Causation and Economics) is a Microsoft Research project aimed at applying Artificial Intelligence concepts to economic decision making. One of its goals is to build a toolkit that combines state-of-the-art machine learning techniques with econometrics in order to bring automation to complex causal inference problems. To date, the ALICE Python SDK (econml) implements orthogonal machine learning algorithms such as the double machine learning work of Chernozhukov et al. This toolkit is designed to measure the causal effect of some treatment variable(s) t on an outcome variable y, controlling for a set of features x.

Jupyter NotebookOthermachine-learningeconomics
microsoft.com/en-us/research/project/alice/
4.7k818
Kanaries/Rath

Next generation of automated data exploratory analysis and visualization platform.

TypeScriptnpmGNU Affero General Public License v3.0dataminingvisualization
rath.kanaries.net
4.7k384
plasma-umass/coz

Coz: Causal Profiling

COtherprofileroptimization
4.5k172
matheusfacure/python-causality-handbook

Causal Inference for the Brave and True. A light-hearted yet rigorous approach to learning about impact estimation and causality.

Jupyter NotebookMIT Licensecausal-inferencepython
matheusfacure.github.io/python-causality-handbook/landing-page.html
3.4k613
pgmpy/pgmpy

Python Toolkit for Causal and Probabilistic Reasoning

PythonPyPIMIT Licensepythonbayesian-networks
pgmpy.org
3.3k1.1k
rguo12/awesome-causality-algorithms

An index of algorithms for learning causality with data

MIT Licensecausalitycausal-inference
3.3k475
tangxyw/RecSysPapers

推荐/广告/搜索领域工业界经典以及最前沿论文集合。A collection of industry classics and cutting-edge papers in the field of recommendation/advertising/search.

PythonPyPIBSD 2-Clause "Simplified" Licensecalibrationcausal-inference
tangxyw.github.io
2.2k265
py-why/causal-learn

Causal Discovery in Python. Learning causality from data.

PythonPyPIMIT Licensecausalcausal-discovery
causal-learn.readthedocs.io/en/latest/
1.7k268
pedrohcgs/claude-code-my-workflow

A ready-to-fork Claude Code template for academics using LaTeX/Beamer + R. Multi-agent review, quality gates, adversarial QA, and replication protocols.

HTMLMIT Licenseacademic-writingcausal-inference
psantanna.com/claude-code-my-workflow/
1.4k2.8k
jrfiedler/causal_inference_python_code

Python code for part 2 of the book Causal Inference: What If, by Miguel Hernán and James Robins

Jupyter Notebookcausalitycausal-inference
1.4k412