Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roronya/causalmodels
Causalmodels: causal modeling in Python
https://github.com/roronya/causalmodels
Last synced: about 2 months ago
JSON representation
Causalmodels: causal modeling in Python
- Host: GitHub
- URL: https://github.com/roronya/causalmodels
- Owner: roronya
- Created: 2016-01-28T08:46:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-28T02:21:47.000Z (over 8 years ago)
- Last Synced: 2024-10-12T17:54:29.739Z (3 months ago)
- Language: Python
- Size: 329 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-python-models - causalmodels - causal modeling in Python. (Model, Schema)
README
# causalmodels
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()