Giter Club home page Giter Club logo

causal-learn's Introduction

causal-learn: Causal Discovery in 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 (>=3.7)
  • 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!

Running Tetrad in Python

Although causal-learn provides python implementations for some causal discovery algorithms, there are currently a lot 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.

causal-learn's People

Contributors

kunwuz avatar markdana avatar zhi-yi-huang avatar jarodyv avatar aoqiz avatar chenweidelight avatar jdramsey avatar ruichucai avatar ignavierng avatar cogito233 avatar wean2016 avatar turuibo avatar marcelrobeer avatar erdungao avatar bja43 avatar kunzhang16 avatar biwei-huang avatar tofuwen avatar yuanningd avatar jonathan-salisbury avatar pckennethma avatar mgong2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.