Skip to main content

Python implementation of causal trees with validation

Project description

CTL

Christopher Tran, Elena Zheleva, "Learning Triggers for Heterogeneous Treatment Effects", AAAI 2019.

Our method is based on and adapted from: https://github.com/susanathey/causalTree

Requirements

  • Python 3
  • sklearn
  • scipy
  • graphviz (if you want to plot the tree)

Installation

through pip

pip install causal_tree_learn

or clone the repository

python setup.py build_ext --inplace

Demo Code

Two demo codes are available to run.

python binary_example.py

Runs the tree on a binary example (asthma.txt)

python trigger_example.py

Runs a tree on a trigger problem where the treatment is continuous (note for now the example is made up and treatment does not affect outcome, this is only to show example code)

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

causal_tree_learn-2.42.tar.gz (124.4 kB view hashes)

Uploaded Source

Built Distributions

causal_tree_learn-2.42-cp310-cp310-macosx_12_0_arm64.whl (216.9 kB view hashes)

Uploaded CPython 3.10 macOS 12.0+ ARM64

causal_tree_learn-2.42-cp37-cp37m-macosx_10_9_x86_64.whl (237.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

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