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
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.4.0.tar.gz
(4.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file causalmodels-0.4.0.tar.gz.
File metadata
- Download URL: causalmodels-0.4.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df8ac5ae1deec28a508a979f89ff452d63f742111d7ed8479967499f38b1354b
|
|
| MD5 |
e06b78d42f8d0ccc7edbab1683ce643a
|
|
| BLAKE2b-256 |
61c2fa784305f0a1e9f4aada243efc7cc02c371dddc607f30bf56aa117d10f4b
|
File details
Details for the file causalmodels-0.4.0-py3-none-any.whl.
File metadata
- Download URL: causalmodels-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41744c7ff2b91b9272333ee44fe00257fb35d714c03986439e9f6ea20ba1f7c4
|
|
| MD5 |
a41567e00261134e553feaa2f95d7f09
|
|
| BLAKE2b-256 |
579046d9bbdbb480742a5871b01b1e82feaad75781933b4eaeeecd6b19262c83
|