Causal models in Python
Project description
causalmodels in Python.
instalation
$ pip install causalmodels
usage
>>> import numpy as np >>> import pandas as pd >>> import causalmodels as cm >>> a = np.random.laplace(size=500) >>> b = np.random.laplace(size=500) + a >>> c = np.random.laplace(size=500) + a + b >>> data = pd.DataFrame({'a': a, 'b': b, 'c': c}) >>> model = cm.DirectLiNGAM() >>> results = model.fit(data.values, data.columns) >>> results.order [2, 1, 0] >>> result.draw()
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
causalmodels-0.3.1.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for causalmodels-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd293e614d5c26906ab3c13174bd4a9cd276e1459bf589c3f87eb84f8b0c3e9 |
|
MD5 | 7f4e12b0447d6de00dcb7f50bf1522b1 |
|
BLAKE2b-256 | 4cd9f27be4b4556693989a276bbe3dc9b75845b6ca6c25ec2da7cf7abc45cbb5 |