Skip to main content

causal-learn Python Package

Project description

causal-learn: Causal Discovery for Python

Causal-learn is a python package for causal discovery that implements both classical and state-of-the-art causal discovery algorithms, which is a Python translation and extension of Tetrad.

The package is actively being developed. Feedbacks (issues, suggestions, etc.) are highly encouraged.

Package Overview

Our causal-learn implements methods for causal discovery:

  • Constraint-based causal discovery methods.
  • Score-based causal discovery methods.
  • Causal discovery methods based on constrained functional causal models.
  • Hidden causal representation learning.
  • Permutation-based causal discovery methods.
  • Granger causality.
  • Multiple utilities for building your own method, such as independence tests, score functions, graph operations, and evaluations.

Install

Causal-learn needs the following packages to be installed beforehand:

  • python 3
  • numpy
  • networkx
  • pandas
  • scipy
  • scikit-learn
  • statsmodels
  • pydot

(For visualization)

  • matplotlib
  • graphviz

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

pip install causal-learn

Documentation

Please kindly refer to causal-learn Doc for detailed tutorials and usages.

Running examples

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.

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.

Contribution

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

causal-learn-0.1.3.2.tar.gz (138.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causal_learn-0.1.3.2-py3-none-any.whl (172.6 kB view details)

Uploaded Python 3

File details

Details for the file causal-learn-0.1.3.2.tar.gz.

File metadata

  • Download URL: causal-learn-0.1.3.2.tar.gz
  • Upload date:
  • Size: 138.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.11.3 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.3

File hashes

Hashes for causal-learn-0.1.3.2.tar.gz
Algorithm Hash digest
SHA256 2072d1e7c71ea80932c560588b20a888c07568af6da8b8ab7c499a653eb89d98
MD5 b6b217ce3d4e6f325be708ba8c98d316
BLAKE2b-256 6cecfe31c2a49f1d5c7671b4860f5427aa80e8d88ee599c6494c4b0c65e6634b

See more details on using hashes here.

File details

Details for the file causal_learn-0.1.3.2-py3-none-any.whl.

File metadata

  • Download URL: causal_learn-0.1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 172.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.11.3 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.3

File hashes

Hashes for causal_learn-0.1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d5f7fa4f5e066b556258e010519751c012ec2f4d8489fadff52c7eb66421f7e8
MD5 b5ed23e16602cb6f60c5edf79b0864f9
BLAKE2b-256 bb2eff73ae6244022121e8b0f875ce6002f5b748e18e9826058827db1f2f654b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page