This Python Package ‘Causal ML’ Provides a Suite of Uplift Modeling and Causal Inference with Machine Learning

Image Source:

‘Causal ML’ is a Python package that deals with uplift modeling, which estimates heterogeneous treatment effect (HTE) and causal inference methods with the help of machine learning (ML) algorithms based on research. It uses a standard interface that allows users to estimate the Conditional Average Treatment Effect (CATE) or Individual Treatment Effect (ITE) from data (experimental or observational).

‘Casual ML’ package provides eight cutting edge uplift modeling algorithms combining causal inference & ML. ‘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’. As mentioned earlier, the package deals with uplift modeling, which estimates heterogeneous treatment effect (HTE), therefore starting with general causal inference, then learning about HTE and uplift modeling would definitely help.

The Github repository contains a good example on Jupyter Notebook of how to use all these algorithms.

AdvertisementCoursera Plus banner featuring Johns Hopkins University, Google, and University of Michigan courses highlighting data science career-advancing content

Some Use Cases:

  • Campaign Targeting Optimization
  • Personalized Engagement

The ‘Casual ML’ package currently supports the following methods:

  • Tree-based algorithms
    • Uplift Random Forests on KL divergence, Euclidean Distance, and Chi-Square
    • Uplift Random Forests on Contextual Treatment Selection
  • Meta-learner algorithms



Read: Using Causal Inference to Improve the Uber User Experience

Installation (Source: )

causalml is available on PyPI, and can be installed from pip or source as follows:

From pip:

pip install causalml

From source:

git clone
cd causalml
python build_ext --inplace
python install


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.