Skip to main content

Python Package for Causal Inference

Project description

CausalForge

PyPI version Documentation Status MIT license Python 3.8+

CausalForge is a Python package that provides a suite of modeling & causal inference methods using machine learning algorithms based on Elevence Health recent research. It provides convenient APIs that allow to estimate Propensity Score, Average Treatment Effect (ATE), Conditional Average Treatment Effect (CATE) or Individual Treatment Effect (ITE) from experimental or observational data. Methods have been redesigned for production. Check out the documentation.

Installing Python Package

We recommend to create a proper enviroment with tensorflow and pytorch installed. For example, for a local Mac enviroment without GPUs:

conda env create -f env_mac.yml
conda activate causalforge

You can install it after cloning this repository, i.e.

git clone https://github.com/anthem-ai/causalforge
cd causalforge
[sudo] pip install -e . [--trusted-host pypi.org --trusted-host files.pythonhosted.org]

or directly from the repository (development), i.e.

pip install --upgrade git+https://github.com/anthem-ai/causalforge [--trusted-host pypi.org --trusted-host files.pythonhosted.org]

or directly from PyPI, i.e.

pip install causalforge

After installing you can import classes and methods, e.g.

import causalforge
causalforge.__version__

Testing

cd tests
pytest --disable-warnings 

Citation

@article{tesei2023learning,
  title={Learning end-to-end patient representations through self-supervised covariate balancing for causal treatment effect estimation},
  author={Tesei, Gino and Giampanis, Stefanos and Shi, Jingpu and Norgeot, Beau},
  journal={Journal of Biomedical Informatics},
  volume={140},
  pages={104339},
  year={2023},
  publisher={Elsevier}
}

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

causalforge-0.0.9.tar.gz (15.0 kB view details)

Uploaded Source

File details

Details for the file causalforge-0.0.9.tar.gz.

File metadata

  • Download URL: causalforge-0.0.9.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for causalforge-0.0.9.tar.gz
Algorithm Hash digest
SHA256 f5334330cc8a7f0da90f183cf9cc54413b4fa292ec5f59be105d705e86bb2a36
MD5 498116adcf3c35a8513ec1f6d8c4941d
BLAKE2b-256 ec861fd3367dee6130d361692afdcd203564c3fadc03d01b76fde0c00ef3a4cb

See more details on using hashes here.

Supported by

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