Skip to main content

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(data.values, data.columns)
>>> results = model.fit()
>>> results.order
[2, 1, 0]
>>> result.plot()

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

causalmodels-0.4.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

causalmodels-0.4.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file causalmodels-0.4.0.tar.gz.

File metadata

File hashes

Hashes for causalmodels-0.4.0.tar.gz
Algorithm Hash digest
SHA256 df8ac5ae1deec28a508a979f89ff452d63f742111d7ed8479967499f38b1354b
MD5 e06b78d42f8d0ccc7edbab1683ce643a
BLAKE2b-256 61c2fa784305f0a1e9f4aada243efc7cc02c371dddc607f30bf56aa117d10f4b

See more details on using hashes here.

File details

Details for the file causalmodels-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for causalmodels-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41744c7ff2b91b9272333ee44fe00257fb35d714c03986439e9f6ea20ba1f7c4
MD5 a41567e00261134e553feaa2f95d7f09
BLAKE2b-256 579046d9bbdbb480742a5871b01b1e82feaad75781933b4eaeeecd6b19262c83

See more details on using hashes here.

Supported by

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