Causal Discovery in Python. Learning causality from data.
See the codeCausal-learn (documentation, paper) is an open-source platform for causal learning with both classical and state-of-the-art causal discovery algorithms. It aims to recover causal structure from observational data, without requiring interventional experiments, while offering provable correctness guarantees.
The package is actively being developed. Feedback (issues, suggestions, etc.) would be greatly appreciated.
Causal discovery is now available anytime, anywhere!
Check out our latest online agentic version of causal-learn: causallearn.com
Our causal-learn implements methods for causal discovery:
Causal-learn needs the following packages to be installed beforehand:
(For visualization)
To use causal-learn, we could install it using pip:
pip install causal-learn
Please kindly refer to causal-learn Doc for detailed tutorials and usages.
For search methods in causal discovery, there are various running examples in the ‘tests’ directory, such as TestPC.py and TestGES.py.
For the implemented modules, such as (conditional) independent test methods, we provide unit tests for the convenience of developing your own methods.
For the convenience of our community, CMU-CLeaR group maintains a list of benchmark datasets including real-world scenarios and various learning tasks. Please refer to the following links:
Please feel free to let us know if you have any recommendations regarding causal datasets with high-quality. We are grateful for any effort that benefits the development of the causality community.
Please feel free to open an issue if you find anything unexpected. And please create pull requests, perhaps after passing unittests in 'tests/', if you would like to contribute to causal-learn. We are always targeting to make our community better!
Although causal-learn provides Python implementations for many causal discovery algorithms, there are more in the classical Java-based Tetrad program. For users who would like to incorporate arbitrary Java code in Tetrad as part of a Python workflow, we strongly recommend considering py-tetrad. Here is a list of reusable examples of how to painlessly benefit from the most comprehensive Tetrad Java codebase.
Please cite as:
@article{zheng2024causal,
title={Causal-learn: Causal discovery in python},
author={Zheng, Yujia and Huang, Biwei and Chen, Wei and Ramsey, Joseph and Gong, Mingming and Cai, Ruichu and Shimizu, Shohei and Spirtes, Peter and Zhang, Kun},
journal={Journal of Machine Learning Research},
volume={25},
number={60},
pages={1--8},
year={2024}
}
434 followers · starred Mar 2026
32 followers · starred Feb 2025
98 followers · starred Nov 2021
102 followers · starred Nov 2021
Causal Discovery in Python. Learning causality from data.
See the codeCausal-learn (documentation, paper) is an open-source platform for causal learning with both classical and state-of-the-art causal discovery algorithms. It aims to recover causal structure from observational data, without requiring interventional experiments, while offering provable correctness guarantees.
The package is actively being developed. Feedback (issues, suggestions, etc.) would be greatly appreciated.
Causal discovery is now available anytime, anywhere!
Check out our latest online agentic version of causal-learn: causallearn.com
Our causal-learn implements methods for causal discovery:
Causal-learn needs the following packages to be installed beforehand:
(For visualization)
To use causal-learn, we could install it using pip:
pip install causal-learn
Please kindly refer to causal-learn Doc for detailed tutorials and usages.
For search methods in causal discovery, there are various running examples in the ‘tests’ directory, such as TestPC.py and TestGES.py.
For the implemented modules, such as (conditional) independent test methods, we provide unit tests for the convenience of developing your own methods.
For the convenience of our community, CMU-CLeaR group maintains a list of benchmark datasets including real-world scenarios and various learning tasks. Please refer to the following links:
Please feel free to let us know if you have any recommendations regarding causal datasets with high-quality. We are grateful for any effort that benefits the development of the causality community.
Please feel free to open an issue if you find anything unexpected. And please create pull requests, perhaps after passing unittests in 'tests/', if you would like to contribute to causal-learn. We are always targeting to make our community better!
Although causal-learn provides Python implementations for many causal discovery algorithms, there are more in the classical Java-based Tetrad program. For users who would like to incorporate arbitrary Java code in Tetrad as part of a Python workflow, we strongly recommend considering py-tetrad. Here is a list of reusable examples of how to painlessly benefit from the most comprehensive Tetrad Java codebase.
Please cite as:
@article{zheng2024causal,
title={Causal-learn: Causal discovery in python},
author={Zheng, Yujia and Huang, Biwei and Chen, Wei and Ramsey, Joseph and Gong, Mingming and Cai, Ruichu and Shimizu, Shohei and Spirtes, Peter and Zhang, Kun},
journal={Journal of Machine Learning Research},
volume={25},
number={60},
pages={1--8},
year={2024}
}
434 followers · starred Mar 2026
32 followers · starred Feb 2025
98 followers · starred Nov 2021
102 followers · starred Nov 2021