Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

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.

Files for causalmodels, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size causalmodels-0.4.0-py3-none-any.whl (6.7 kB) File type Wheel Python version 3.4 Upload date Hashes View
Filename, size causalmodels-0.4.0.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page