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.3.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causalmodels-0.3.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

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

Hashes for causalmodels-0.3.3.tar.gz
Algorithm Hash digest
SHA256 1d67424b5f7eaae315ea7edfca8394752e4d9cd4c8313c5713203b6c972717b1
MD5 a4315f0083b3dad64a26f967999fce9c
BLAKE2b-256 8eb7a6405e79a229299dba6e6de1fa110cf71f3984cd7f40104bdadeacc248e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for causalmodels-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bbad3e39defeeabd7f712cc0e73c3c0f9f72047247b27df49eb3405f8deb2fb1
MD5 fb74136d264612306b523d837a22328b
BLAKE2b-256 8fc3f557a6f227f1df4ae419530f40eccc725071e10a9283b6bc6ff7b3f1dcab

See more details on using hashes here.

Supported by

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