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
Release history Release notifications | RSS feed
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)
Built Distributions
Close
Hashes for causal_tree_learn-2.42-cp310-cp310-macosx_12_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966a5eb719ab1db768e0e6e5334b24cdbeffe24b6a3cc0e68f6a548fa855a8ca |
|
MD5 | 87dc4c7442c79267da900a5783aa0b37 |
|
BLAKE2b-256 | 849c93467dd4cad79aa712df445356d010c636fa19258a9e09b4ecb3c229f708 |
Close
Hashes for causal_tree_learn-2.42-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c468223a8f3ecc7989847348a4c16c1423827279c70169f297d3c106b9bed4 |
|
MD5 | bb794bbdd14573476dbdbdcf02f5b859 |
|
BLAKE2b-256 | f714233de6396bfdf5f4c14df8a0b20c4612a26a89fbb5fe52fe24081d89b888 |