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

pip install causal_tree_learn

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-1.0.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

causal_tree_learn-1.0.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file causal_tree_learn-1.0.1.tar.gz.

File metadata

  • Download URL: causal_tree_learn-1.0.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for causal_tree_learn-1.0.1.tar.gz
Algorithm Hash digest
SHA256 940603fa007cc9b795f156fb286a8acd0c1b8d89db2ba0e0f69a2ae6d5459e1f
MD5 adcf85ac2d851ed8e3b349bdd8c2dd7e
BLAKE2b-256 33b15e9a881712ed74cbe1b8c303c53dc22a2c8e58476076f6ca7802be49624e

See more details on using hashes here.

File details

Details for the file causal_tree_learn-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: causal_tree_learn-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for causal_tree_learn-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c58a7d803a1e7fc634478a92c346765fbba803e7fe039e0ba54f6f4e611dd63
MD5 008a7e980c8526e60e9833cda68a0359
BLAKE2b-256 9bba9c0f0d937279116cf403b49c90cb0a7b5e84f73bc4523bcefd7ba8dc7e61

See more details on using hashes here.

Supported by

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