Getting started

Installation

Requirements

  • python 3 (>=3.7)

  • numpy

  • networkx

  • pandas

  • scipy

  • scikit-learn

  • statsmodels

  • pydot

(For visualization)

  • matplotlib

  • graphviz

  • pygraphviz (might not support the most recent Mac)

Install via PyPI

To use causal-learn, we could install it using pip:

(.venv) $ pip install causal-learn

Install from source

For development version, please kindly refer to our GitHub Repository.

Running examples

For search methods in causal discovery, there are various running examples in the ‘tests’ directory in our GitHub Repository, 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.

Benchmarks

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 recommendation regarding causal datasets with high-quality. We are grateful for any effort that benefits the development of causality community.

Contributors

Team Leaders: Kun Zhang, Joseph Ramsey, Mingming Gong, Ruichu Cai, Shohei Shimizu, Peter Spirtes, Clark Glymour

Coordinators: Yujia Zheng, Biwei Huang, Wei Chen

Developers:

Quality control: Yewen Fan, Haoyue Dai, Yujia Zheng, Ignavier Ng, Xiangchen Song

Citation

Please cite as:

@article{causallearn,
  title={Causal-learn: Causal Discovery in Python},
  author={Yujia Zheng and Biwei Huang and Wei Chen and Joseph Ramsey and Mingming Gong and Ruichu Cai and Shohei Shimizu and Peter Spirtes and Kun Zhang},
  journal={arXiv preprint arXiv:2307.16405},
  year={2023}
}