Skip to main content

No project description provided

Project description

Causal discovery

Causal discovery is the process of inferring causal relationships between variables from observational data. This repository aims to provide a collection of causal discovery algorithms implemented in Python.

Development setup

This repository uses Poetry as a dependency manager. To install the dependencies, run:

$ poetry install

Usage

You can install the package from PyPI:

$ pip install causal-discovery

example usage:

from causal_discovery.algos.notears import NoTears

# load dataset
dataset = ...  

# initialize model
model = NoTears(
    rho=1, 
    alpha=0.1, 
    l1_reg=0, 
    lr=1e-2
)

# learn the graph
_ = model.learn(dataset)

# adjacency matrix
print(model.get_result())

Algorithms

Algorithm Reference
NOTEARS DAGs with NO TEARS: Continuous Optimization for Structure Learning, 2019

Results

This is the example of the results of the algorithm.

Results

How to read this figure: for any value in coordinate (x, y) means the causal effect from y -> x.

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_discovery-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

causal_discovery-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file causal_discovery-0.1.1.tar.gz.

File metadata

  • Download URL: causal_discovery-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.11 Darwin/22.2.0

File hashes

Hashes for causal_discovery-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8101faa9e9a05d8f7fbc78c8362e23355204cf8a67259e3aefe2449932bb3480
MD5 292441305f4799e9c53d4396c400194b
BLAKE2b-256 ca43bcccb03835cf3a163350934a9d9e5ff5d53cb8f8a5ff3e48d00234c0410b

See more details on using hashes here.

File details

Details for the file causal_discovery-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: causal_discovery-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.11 Darwin/22.2.0

File hashes

Hashes for causal_discovery-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d95025c1a77afcb74667b4b64a2bf64bc9bc2a2a89cf48bea0a86fd1664e6f69
MD5 7110566454cc36730e9b399215de9bd4
BLAKE2b-256 4c150693b5d3ab4f813f9c2c328b349a16d1994ca1ccd13d86eba753c2d4c2dd

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