Skip to main content

PyPI Version Build Status Documentation Status Downloads CII Best Practices

Disclaimer

This project is stable and being incubated for long-term support. It may contain new experimental code, for which APIs are subject to change.

Causal ML: A Python Package for Uplift Modeling and Causal Inference with ML

Causal ML is a Python package that provides a suite of uplift modeling and causal inference methods using machine learning algorithms based on recent research [1]. It provides a standard interface that allows user to estimate the Conditional Average Treatment Effect (CATE) or Individual Treatment Effect (ITE) from experimental or observational data. Essentially, it estimates the causal impact of intervention T on outcome Y for users with observed features X, without strong assumptions on the model form. Typical use cases include

  • Campaign targeting optimization: An important lever to increase ROI in an advertising campaign is to target the ad to the set of customers who will have a favorable response in a given KPI such as engagement or sales. CATE identifies these customers by estimating the effect of the KPI from ad exposure at the individual level from A/B experiment or historical observational data.

  • Personalized engagement: A company has multiple options to interact with its customers such as different product choices in up-sell or messaging channels for communications. One can use CATE to estimate the heterogeneous treatment effect for each customer and treatment option combination for an optimal personalized recommendation system.

Documentation

Documentation is available at:

https://causalml.readthedocs.io/en/latest/about.html

Installation

Installation instructions are available at:

https://causalml.readthedocs.io/en/latest/installation.html

Quickstart

Quickstarts with code-snippets are available at:

https://causalml.readthedocs.io/en/latest/quickstart.html

Example Notebooks

Example notebooks are available at:

https://causalml.readthedocs.io/en/latest/examples.html

Contributing

We welcome community contributors to the project. Before you start, please read our code of conduct and check out contributing guidelines first.

Versioning

We document versions and changes in our changelog.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

References

Documentation

Conference Talks and Publications by CausalML Team

Citation

To cite CausalML in publications, you can refer to the following sources:

Whitepaper: CausalML: Python Package for Causal Machine Learning

Bibtex:

@misc{chen2020causalml, title={CausalML: Python Package for Causal Machine Learning}, author={Huigang Chen and Totte Harinen and Jeong-Yoon Lee and Mike Yung and Zhenyu Zhao}, year={2020}, eprint={2002.11631}, archivePrefix={arXiv}, primaryClass={cs.CY} }

Literature

  1. Chen, Huigang, Totte Harinen, Jeong-Yoon Lee, Mike Yung, and Zhenyu Zhao. "Causalml: Python package for causal machine learning." arXiv preprint arXiv:2002.11631 (2020).
  2. Radcliffe, Nicholas J., and Patrick D. Surry. "Real-world uplift modelling with significance-based uplift trees." White Paper TR-2011-1, Stochastic Solutions (2011): 1-33.
  3. Zhao, Yan, Xiao Fang, and David Simchi-Levi. "Uplift modeling with multiple treatments and general response types." Proceedings of the 2017 SIAM International Conference on Data Mining. Society for Industrial and Applied Mathematics, 2017.
  4. Hansotia, Behram, and Brad Rukstales. "Incremental value modeling." Journal of Interactive Marketing 16.3 (2002): 35-46.
  5. Jannik Rößler, Richard Guse, and Detlef Schoder. "The Best of Two Worlds: Using Recent Advances from Uplift Modeling and Heterogeneous Treatment Effects to Optimize Targeting Policies". International Conference on Information Systems (2022)
  6. Su, Xiaogang, et al. "Subgroup analysis via recursive partitioning." Journal of Machine Learning Research 10.2 (2009).
  7. Su, Xiaogang, et al. "Facilitating score and causal inference trees for large observational studies." Journal of Machine Learning Research 13 (2012): 2955.
  8. Athey, Susan, and Guido Imbens. "Recursive partitioning for heterogeneous causal effects." Proceedings of the National Academy of Sciences 113.27 (2016): 7353-7360.
  9. Künzel, Sören R., et al. "Metalearners for estimating heterogeneous treatment effects using machine learning." Proceedings of the national academy of sciences 116.10 (2019): 4156-4165.
  10. Nie, Xinkun, and Stefan Wager. "Quasi-oracle estimation of heterogeneous treatment effects." arXiv preprint arXiv:1712.04912 (2017).
  11. Bang, Heejung, and James M. Robins. "Doubly robust estimation in missing data and causal inference models." Biometrics 61.4 (2005): 962-973.
  12. Van Der Laan, Mark J., and Daniel Rubin. "Targeted maximum likelihood learning." The international journal of biostatistics 2.1 (2006).
  13. Kennedy, Edward H. "Optimal doubly robust estimation of heterogeneous causal effects." arXiv preprint arXiv:2004.14497 (2020).
  14. Louizos, Christos, et al. "Causal effect inference with deep latent-variable models." arXiv preprint arXiv:1705.08821 (2017).
  15. Shi, Claudia, David M. Blei, and Victor Veitch. "Adapting neural networks for the estimation of treatment effects." 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), 2019.
  16. Zhao, Zhenyu, Yumin Zhang, Totte Harinen, and Mike Yung. "Feature Selection Methods for Uplift Modeling." arXiv preprint arXiv:2005.03447 (2020).
  17. Zhao, Zhenyu, and Totte Harinen. "Uplift modeling for multiple treatments with cost optimization." In 2019 IEEE International Conference on Data Science and Advanced Analytics (DSAA), pp. 422-431. IEEE, 2019.

Related projects

  • uplift: uplift models in R
  • grf: generalized random forests that include heterogeneous treatment effect estimation in R
  • rlearner: A R package that implements R-Learner
  • DoWhy: Causal inference in Python based on Judea Pearl's do-calculus
  • EconML: A Python package that implements heterogeneous treatment effect estimators from econometrics and machine learning methods

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

causalml-0.15.2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distributions

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

causalml-0.15.2-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

causalml-0.15.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

causalml-0.15.2-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

causalml-0.15.2-cp311-cp311-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

causalml-0.15.2-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

causalml-0.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

causalml-0.15.2-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

causalml-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

causalml-0.15.2-cp39-cp39-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.9Windows x86-64

causalml-0.15.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

causalml-0.15.2-cp39-cp39-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

causalml-0.15.2-cp39-cp39-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

causalml-0.15.2-cp38-cp38-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.8Windows x86-64

causalml-0.15.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

causalml-0.15.2-cp38-cp38-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

causalml-0.15.2-cp38-cp38-macosx_10_9_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file causalml-0.15.2.tar.gz.

File metadata

  • Download URL: causalml-0.15.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for causalml-0.15.2.tar.gz
Algorithm Hash digest
SHA256 f071916bdf120e202e683f235675493ddac6de57e3b679e0b624c99b5a549cf0
MD5 058b4ec5f3f64391b930058a3b6d9bf1
BLAKE2b-256 0c0c8e82007557c9bd3626db0b8c7cec245c2664d591945eb86e2a2b6bc9c766

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: causalml-0.15.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for causalml-0.15.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7e10b16bcfd1a82093d0f7c79390fcc333ea34962d63abe0dc173eab9797fbd1
MD5 b0327a33ef217b4329b2b24856f5eeab
BLAKE2b-256 90ceb184527b83dbf8f82038937c6d7dddd489119a7b44bee073198ff4b04711

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9ba072ac6ee593596252cce56f5dda60ced37cf0ed1d32744153af84bf0fd96
MD5 0f7b58152130035186c14d4d1b6244c5
BLAKE2b-256 47a62b4e13d9a3c39d81944a506ee8abaff249d7e22264c9ba2ceb44c565a1dc

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 73e5cd00d1bd30c275dea4c4c3553e74d28b057ad7cd9b3accf81a2f3d78120e
MD5 3ff36c9a0d032828bc649494a7706baa
BLAKE2b-256 1d81a99aaa2ef26dc09e4b661396c86fff3851d5e910afab337ea4341d7d76d6

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 277780eec99e1a1e72d18d7603cde2ed0256663e7fdc5b24e636b954e285d382
MD5 af90be1500047c65cc7ba017ae26edb2
BLAKE2b-256 5c7772668284f335745b6f38815854a6152108457ab6f8cae1af96d2c9f4aaa2

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: causalml-0.15.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for causalml-0.15.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4e0c7a5c442113e06ac4c95575806563be58d886b5089d3b22b086186854afd9
MD5 fbab06fdd03f5ce0da99877c9e8156b2
BLAKE2b-256 7423474dd118de3b5ff4d2871985465d12e6a7fb9ab1706cd878c19adff248df

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 205ed871e258f69737aceca505d751ed039ec469c4390e7cfaf642e5b24c3060
MD5 97eea96bedaa5af9a6f213a5c908d602
BLAKE2b-256 312108451acfadc40333da2cb4e0c51942c7d36272080ccb4c307255e61d44b9

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c9d0e39d5e4429397c7089fc1e0a07f917aacd6a9ee6e6e4dc1fa8dc292ec0d1
MD5 f922603b6c7b37742341db5e0fd7f6f4
BLAKE2b-256 0bdc29edbcb1a8ee8822c4dd3464cbf348640d6f5934d20c24bd1350bb83fccf

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b141f5284364e88908fd86c5110d67dc886bd12d998f9e9abe2babf56f1682c2
MD5 d3ebaa76c3b50e361f96b15093d3d836
BLAKE2b-256 dfc3feaea4b776065de4186dc4636d8fbb18447507a139df4c6298d416304acd

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: causalml-0.15.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for causalml-0.15.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 eb7357a35cfabd41bed671b8e5f583f30be525b111432a47e8158ee5ed0fc2dd
MD5 91021ff552647b972aa57c20733e195c
BLAKE2b-256 f003a66eefaf31e167121016311b2300957e5fd48fbac5631fc3f7355a1f8afa

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 32d1c3d26af6114b806ab2e43f8b7dbcd6fc0addd3c649680f537756670cab5b
MD5 352f1a6524df5a4170b0d4a027cde78a
BLAKE2b-256 caf6ecd0c952ae80c2a5681cf202dec6a6bd2737982125a0d343da18382b5431

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e88cc8f84165d67575c613de78082ee7d65327381b748d7c7b5e00f7bce65647
MD5 047a691abfddd9d7ffdd5afec3f0f072
BLAKE2b-256 c3b9550d3af77d3cdb7877b34d942964cab13f8d28bc85132f3a9dd8f51cd622

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 273765ad5ad38a6deaaa25252f5212ba0d10f6e469fdb1ebd2ca1cb4bc941674
MD5 4a149cb6672a3e9ddad15ec4d039fbb7
BLAKE2b-256 ea8231a6c2c8e11eaf82eb27c5f57973d8e72d3c6aef8c312bd949f0ff05ea6e

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: causalml-0.15.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for causalml-0.15.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 608da7892c03f5b5abaccd8e8f4283420ba3a7f4fa82e56d79360e9b3e260300
MD5 68fcaed7da4e344610fd99c0b5c17efd
BLAKE2b-256 712506bf90a0263145f6e01e8feb7f3f44f3ec0c69259aaf885e6fa2039fffb3

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e782651b73e14845d4d856c8819c706da81a0e4ee16009754f149e4f4daf0a37
MD5 ba176eecabfe6e5a53f7becdcb2c36ba
BLAKE2b-256 5bc9b95be6142083b78cb26c2bc733438454d33940c3dd4f99fb9c206dc4a0a4

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6fe8f28627be3274f01a6f178272c8df39ee5d124e744e6bdc0fa206a54a6322
MD5 0a332658054d28ac3b39632d653fad72
BLAKE2b-256 17a93ed310ae58472070c275a96b30be553a741971c450eee8036bc5cfdfd832

See more details on using hashes here.

File details

Details for the file causalml-0.15.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for causalml-0.15.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 613c82ed8bbf6515d63d0cdb1bf8cb95c3301e6dbcafd29428dc29788e43590f
MD5 b4d12b7ebe1e1532d8b34c059157d4aa
BLAKE2b-256 55eac157bbaa96bbe6aa2f124e7416c871010b5ac88a53281599dbf430f18d54

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 Sentry Error logging StatusPage Status page