Causal-learn: Causal Discovery in Python
Yujia Zheng, Biwei Huang, Wei Chen, Joseph Ramsey, Mingming Gong, Ruichu Cai, Shohei Shimizu, Peter Spirtes, Kun Zhang
TL;DR
The paper addresses the need for accessible causal discovery from observational data by introducing causal-learn, a Python-based library that covers a broad spectrum of algorithms across constraint-based, score-based, and functional causal models. It provides modular components for independence tests, scores, graphs, and evaluation, with full Python implementation and no dependencies on Java or R. Key contributions include a flexible, extensible architecture, extensive documentation and demos, and bundled benchmark datasets to facilitate method development and evaluation. The platform aims to accelerate practical deployment and research in causality across domains by lowering integration barriers and keeping pace with advances in causal discovery.
Abstract
Causal discovery aims at revealing causal relations from observational data, which is a fundamental task in science and engineering. We describe $\textit{causal-learn}$, an open-source Python library for causal discovery. This library focuses on bringing a comprehensive collection of causal discovery methods to both practitioners and researchers. It provides easy-to-use APIs for non-specialists, modular building blocks for developers, detailed documentation for learners, and comprehensive methods for all. Different from previous packages in R or Java, $\textit{causal-learn}$ is fully developed in Python, which could be more in tune with the recent preference shift in programming languages within related communities. The library is available at https://github.com/py-why/causal-learn.
