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
Built Distribution
File details
Details for the file causal-tree-learn-2.43.tar.gz
.
File metadata
- Download URL: causal-tree-learn-2.43.tar.gz
- Upload date:
- Size: 121.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0807f314ae8645f60725f5ecae7aee0ede8b365b7f628fce9a32e9c0b7553c96 |
|
MD5 | de9aa1261feac085c0f464284bd010f2 |
|
BLAKE2b-256 | c8fd491e078adb7ce1b32c25340296c9cea51c24aad1443dc6ed0036bf3112ee |
File details
Details for the file causal_tree_learn-2.43-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: causal_tree_learn-2.43-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 216.9 kB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f089b99701b50d6dc059d0ae44e7180a18d93a9bed281794f935b5fdf196c95c |
|
MD5 | 0d50d47cd2d53c3e41ac087c12986abf |
|
BLAKE2b-256 | 276df13117f3b40c95b8cdf350a268bfece7e59ef52b338f108630b0f689bad3 |