whatisgithub

What is causalml?

uber/causalml — explained in plain English

Analysis updated 2026-06-26

5,834PythonAudience · dataComplexity · 4/5LicenseSetup · moderate

In one sentence

A Python package from Uber for measuring whether your actions actually caused an outcome, helping you target promotions at the people most likely to respond and not just those who would have bought anyway.

Mindmap

mindmap
  root((causalml))
    Core Concept
      Causal inference
      Uplift modeling
      Individual effect estimation
    Use Cases
      Ad campaign targeting
      Personalized engagement
      Treatment optimization
    Data Sources
      A/B test results
      Observational data
    Algorithms
      Multiple methods
      Consistent interface
      Academic research based
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Identify which customers will actually change their behavior because of an ad or promotion, so you spend budget only on people who respond.

USE CASE 2

Estimate the individual effect of a treatment on each user based on their characteristics, rather than averaging across everyone.

USE CASE 3

Analyze data from A/B tests to figure out which users benefited most from a given campaign.

USE CASE 4

Choose the best personalized offer or message for each customer by predicting which option produces the highest response per individual.

What is it built with?

Python

How does it compare?

uber/causalmlwendesi/lihang_book_algorithmazure/azure-sentinel
Stars5,8345,8365,839
LanguagePythonPythonPython
Setup difficultymoderatemoderatehard
Complexity4/53/54/5
Audiencedataresearcherops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires familiarity with A/B testing concepts and Python data science tools, some experimental APIs may change.

Apache 2.0 License, use freely for any purpose including commercial projects, document any changes you make.

So what is it?

CausalML is a Python package from Uber that helps answer a specific type of question: not just whether something happened, but whether an action you took actually caused it. This is the problem that causal inference addresses. For example, a company might run an ad campaign and see an increase in purchases, but were those purchases caused by the ad, or would those customers have bought anyway? CausalML provides tools to estimate the difference. The core idea in the package is uplift modeling, also called heterogeneous treatment effect estimation. Rather than measuring the average effect of a treatment across all users, it tries to estimate the effect for each individual person based on their characteristics. This matters when the same action can have very different effects on different people: some users respond strongly to a promotion, others are unaffected, and some might even react negatively. Two main use cases are described in the README. One is campaign targeting: instead of showing an ad to everyone, identify which customers will actually change their behavior because of the ad and focus spend on them. The other is personalized engagement: when a company has multiple options for interacting with a customer (different offers, channels, or messages), causal methods can estimate which option will produce the best outcome for each individual. The package works with data from controlled experiments (like A/B tests) or from historical observational data where no experiment was run. It provides a consistent interface across many different underlying algorithms, so you can swap methods without rewriting your analysis code. The underlying methods come from academic research, and the README includes a list of the relevant papers. CausalML is released under the Apache 2.0 License. It is described as stable and incubated for long-term support, though parts of it may include experimental code with APIs that could change.

Copy-paste prompts

Prompt 1
I have A/B test data with treatment and control groups and user features. How do I use uber/causalml to estimate the uplift for each individual user?
Prompt 2
Using CausalML, how do I identify which customers are persuadables, people who buy only when shown an ad, versus those who would buy anyway?
Prompt 3
I want to compare multiple uplift models in CausalML on the same dataset. Show me how to run several algorithms and evaluate which has the best performance.
Prompt 4
How does CausalML handle observational data where no randomized experiment was run? What methods does it provide for that case?

Frequently asked questions

What is causalml?

A Python package from Uber for measuring whether your actions actually caused an outcome, helping you target promotions at the people most likely to respond and not just those who would have bought anyway.

What language is causalml written in?

Mainly Python. The stack also includes Python.

What license does causalml use?

Apache 2.0 License, use freely for any purpose including commercial projects, document any changes you make.

How hard is causalml to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is causalml for?

Mainly data.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.