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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file causal_tree_learn-2.28.tar.gz.
File metadata
- Download URL: causal_tree_learn-2.28.tar.gz
- Upload date:
- Size: 107.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e330579afe868cecb4608391244869caa494694f75c93c1e8a34e1537e98e84
|
|
| MD5 |
55769fd0644594f9a296d508a68eecde
|
|
| BLAKE2b-256 |
ac198b236383e10bd7b43f81c8d9999dbc3ec6b3c1ca529db2cb453d8d0609d4
|
File details
Details for the file causal_tree_learn-2.28-cp37-cp37m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: causal_tree_learn-2.28-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 197.2 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917be38e6ba5f0cfef19acf9c397b1e57885e6d271f441899402911eb3208377
|
|
| MD5 |
1a5ee203bd010e4e7a50ecc6167936f1
|
|
| BLAKE2b-256 |
17e9433214bfdadf8775a3d49a01adbfa9f2f44c4f0f7415d50f4641ab6810ae
|