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

‘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.

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

Asif Razzaq is an AI Journalist and Cofounder of Marktechpost, LLC. He is a visionary, entrepreneur and engineer who aspires to use the power of Artificial Intelligence for good.

Asif's latest venture is the development of an Artificial Intelligence Media Platform (Marktechpost) that will revolutionize how people can find relevant news related to Artificial Intelligence, Data Science and Machine Learning.

Asif was featured by Onalytica in it’s ‘Who’s Who in AI? (Influential Voices & Brands)’ as one of the 'Influential Journalists in AI' ( His interview was also featured by Onalytica (