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
Pull this repository and run the following command:
$ poetry build
Then, install the package:
$ pip install dist/causal-discovery-0.1.0.tar.gz
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.X)
# adjacency matrix
print(model.W)
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.
How to read this figure: for any value in coordinate (x, y) means the causal effect from y -> x.
Project details
Release history Release notifications | RSS feed
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.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for causal_discovery-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21e040edbdaf06c495b9193119461f84efe861a1800fa28fc7849bad3c9f0af1 |
|
MD5 | 208978622555605319b9bf8690e6d2cd |
|
BLAKE2b-256 | 6551ee6cbc1b19a942d94a6337182b67d62e5cedae1e13c8882ea737272151eb |