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.3.3.tar.gz
(4.2 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.3.3.tar.gz.
File metadata
- Download URL: causalmodels-0.3.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d67424b5f7eaae315ea7edfca8394752e4d9cd4c8313c5713203b6c972717b1
|
|
| MD5 |
a4315f0083b3dad64a26f967999fce9c
|
|
| BLAKE2b-256 |
8eb7a6405e79a229299dba6e6de1fa110cf71f3984cd7f40104bdadeacc248e9
|
File details
Details for the file causalmodels-0.3.3-py3-none-any.whl.
File metadata
- Download URL: causalmodels-0.3.3-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbad3e39defeeabd7f712cc0e73c3c0f9f72047247b27df49eb3405f8deb2fb1
|
|
| MD5 |
fb74136d264612306b523d837a22328b
|
|
| BLAKE2b-256 |
8fc3f557a6f227f1df4ae419530f40eccc725071e10a9283b6bc6ff7b3f1dcab
|