The Lift Curve shows how much better a classification model is at finding positive cases than selecting observations at random. A lift of 4 at 10%, for example, means the top 10% ranked by your model contains positive cases at four times the population average.
Lift Curve: Formula and Interpretation at a Glance
Cumulative lift at a selected population fraction: positive rate in the top-ranked group ÷ positive rate in the full evaluation population. Rank observations by the model score before selecting the group.
Example: if 10% of all cases are positive but 40% of the top-ranked group are positive, lift is 4. Lift = 1 matches the random-selection baseline; lift above 1 means a higher positive concentration at that selection fraction.
Want the implementation? Open the Python lift-curve code example. To assess the quality of the predicted probabilities themselves, read our Brier Score guide.
Next step: use the free roadmap’s Core ML phase to connect ranking, probability evaluation and practical model-building.
Lift versus gains: what the numbers mean
Suppose an evaluation set contains 1,000 customers and 100 positive outcomes. Your top-ranked 100 customers contain 40 positives. Their positive rate is 40%, compared with 10% overall: lift is 4. Cumulative gains at that cutoff is 40/100 = 40%, because you captured 40% of all positives.
Choose the selection fraction to match your capacity, such as the number of customers you can contact. Compare models on the same held-out population and report the cutoff and positive rate. Lift is a ranking measure; it does not prove that contacting those customers causes an increase in outcomes.
For probability quality, see Brier score. For performance across thresholds, see ROC curves.
Build the habit of honest evaluation. Read the free Starter Kit excerpt on test sets. The complete practical handbook is €19.
Lift Analysis: Read the Chart as a Table
Let’s extend the example above. Suppose the top 200 customers contain 60 of the 100 positives. These are illustrative counts, not results from a fitted model.
| Selected group | Cases | Positives | Positive rate | Gains | Lift |
|---|---|---|---|---|---|
| Top 10% | 100 | 40 | 40% | 40% | 4.0 |
| Top 20% | 200 | 60 | 30% | 60% | 3.0 |
| All 100% | 1,000 | 100 | 10% | 100% | 1.0 |
At a 20% review budget: gains = 60/100 = 60%, while lift = (60/200)/(100/1,000) = 3. The table makes the distinction explicit: gains measures the share of all positives captured; lift measures their concentration relative to the baseline. Here, each row is cumulative. A decile-only table instead scores each separate 10% band; do not confuse the two.
Is this the same as lift in an experiment? No. This chart evaluates a model’s ranking of observed outcomes. Estimating whether a campaign causes extra conversions requires a suitable treatment/control comparison. A high-ranking customer might convert without being contacted. For the chart relationship, see IBM’s gains and lift explanation.
Imagine you can contact only 10% of your customers. Which 10% should you choose?
If your model is useful, ranking customers by predicted probability should concentrate many more positive cases in that top 10% than random selection would.
Lift measures exactly that advantage.
In this guide we’ll see how the Lift Curve works, how to interpret it, and how it complements other classification metrics such as the ROC curve and confusion matrix.
The Confusion Matrix in Python
The Probability Output of a Classification Model
Let’s use a binary classification problem.
Imagine we’re building a model that predicts whether a patient has a particular disease.
Many classification algorithms don’t simply output:
Disease = Yes
or:
Disease = No
They can also provide a score or estimated probability associated with the positive class.
For example:
| Patient | Predicted probability |
|---|---|
| A | 0.94 |
| B | 0.87 |
| C | 0.72 |
| D | 0.31 |
| E | 0.08 |
We can use those probabilities to rank patients from most likely to least likely to be positive.
That ranking is the foundation of the Lift Curve.

What Is Lift?
Lift compares the proportion of positive cases found in a selected group with the proportion we would expect from the population as a whole.
In simple terms:
Lift = positive rate in selected group / positive rate in total population
Suppose 10% of the full population has the disease.
Now imagine that among the top 10% of patients ranked by our model, 40% actually have it.
Then:
Lift = 40% / 10% = 4
Our model has therefore concentrated positive cases at 4× the population average in that group.
That’s useful.
Instead of examining people randomly, we can focus resources on the group where positive cases are much more concentrated.
The Data
The dataset used for this example is the UCI Cardiotocography Dataset, which you can find here. You don’t need to download the data to follow this post, but the code to plot the Lift Curve is available if you want to try it yourself.
The goal of our model will be to classify patients that have a certain heart pathology. Let’s see how the Lift Curve can help us evaluate the model.
The Lift Curve in Machine Learning
The following Figure shows an example of how a normal lift curve looks:

As we can see, on the X — axis we have the proportion of our sample that corresponds to a certain Lift, plotted on the Y — axis. The Lift is easily calculated as the ratio of 1s on a certain sample point, divided by the ratio of 1s on the whole dataset, which can also be viewed as the predictions that a random algorithm would be making.

How to build the Lift Curve: Plotting the Lift Chart
Building a Lift Curve is very easy. First we must sort out the predictions of our model from highest (closest to 1) to smallest (closest to zero). In this way we have our population ranked by how likely they are to have the disease.
The process is easier than it initially sounds.
Step 1: Generate probabilities
Use your classifier to produce probabilities for the positive class on unseen data.
Step 2: Sort observations

Order them from highest predicted probability to lowest.
Step 3: Take cumulative portions of the population
For example:
- top 5%
- top 10%
- top 20%
- top 30%
- …
- 100%
Step 4: Calculate lift at each point
For each cumulative group, compare its positive rate with the overall positive rate.
Step 5: Plot it
The X-axis represents the proportion of the population selected.
The Y-axis represents lift.
A random model sits around:
Lift = 1
because random selection doesn’t concentrate positive cases better than the population average.
How to read the Lift Curve: Interpreting the Lift Chart
Let’s return to our medical example.
Suppose:
- 10% of all patients have the disease.
- Among the top 10% ranked by our model, 40% have it.
The lift at 10% is: 4
This tells us something immediately actionable:
By examining the 10% of patients our model ranks highest, we encounter positive cases at four times the rate we’d get from random selection.
Now suppose that among the top 50%, 20% have the disease.
The lift at 50% is: 2
As we include more of the population, the concentration of positives usually decreases.
Eventually, when we include 100% of the population, lift converges to 1.
We’re simply looking at the original population again.

Point A marks an early high-lift region. Treat its value cautiously: a very small selected group can produce a large, unstable lift estimate. Report the selected fraction and the number of observations alongside lift.
Compare models at the same targeting budget on the same held-out data. A curve with a higher maximum is not necessarily better at the fraction you can review or contact. Also inspect precision and recall to understand how many selected cases are correct and how many positives remain outside the selected group.

For point B, we have chosen a sample including 10% of our population, where we can see that we have more than 4 times more of positive labels than the average. How do we translate this into useful information? Imagine that our records show that 10% of the patients had heart disease and 90% did not. The information on point B would be telling us that the 10% of our population with the highest chance of having the disease has about 4 times more proportion of diseases than the mean.
So in our example, that group of 10% of the population with the highest probability predicted by our algorithm would have around a 40% (4 times the 10% mean) proportion of sick patients.
Finally, point C is very similar to point B, but for a sample which includes the 50% of our population with the highest chance of having the disease. For this sample the proportion of sick patients is twice as much as the mean, so it would be a 20% proportion of sick patients.
One last interesting concept to explain is that of the Ideal Lift. This happens very rarely, when the start of the lift curve is flat, like in the following figure.

What this means is that until the Lift Curve starts to drop, as you make the proportion of sample larger, the Lift remains constant, so the group of your population that has the Maximum Lift, gets bigger and bigger until this drop happens, which is something very good.
Here you can find the code to plot a Lift Curve using the real labels of a set of data points and the corresponding predicted probabilities.
What Is a Good Lift Curve?
There is no universal value that defines a “good” lift curve.
Generally:
- Lift = 1: no improvement over random selection.
- Lift > 1: the model is concentrating positives better than random.
- Higher early lift: usually desirable when you can act only on a small portion of the population.
But the value you care about depends on the business problem.
If a marketing team can contact only 5% of customers, lift around the top 5% matters much more than lift at 70%.
If a medical screening process can evaluate 30% of a population, the relevant part of the curve changes.
This is one of the strengths of lift analysis: it connects model performance with how the model will actually be used.
Lift Curve Example
Imagine a company has:
100,000 customers
and historically:
5% purchase after receiving an offer.
Randomly contacting 10,000 customers would therefore produce approximately:
500 buyers
Now suppose a model ranks customers by their predicted probability of buying.
Among its top 10,000 customers, the actual response rate is 15%.
That means:
1,500 buyers
The lift at 10% is:
15% / 5% = 3
So targeting customers with the model produces 3× the positive concentration of random targeting.
This is why lift curves have traditionally been popular in marketing, credit risk, churn and other prioritization problems.
Lift Curve vs Cumulative Gains Curve
Lift curves and cumulative gains curves are closely related, but they show the model’s ranking performance differently.
A cumulative gains curve asks:
What percentage of all positive cases have I captured by targeting X% of the population?
A lift curve asks:
How much better is this selected population than random selection?
Both start from the same basic idea: rank observations using model scores and see how efficiently positives are concentrated toward the top.
Lift Curve vs ROC Curve
ROC and lift curves both evaluate classifiers, but they answer different questions.
A ROC curve examines the trade-off between the true positive rate and false positive rate across classification thresholds.
A Lift Curve focuses more directly on prioritization:
If I act on the top X% of my model’s predictions, how much better am I doing than random selection?
This makes lift particularly intuitive when resources are constrained.
For example:
- Which 5% of customers should Sales contact?
- Which 10% of transactions should investigators review?
- Which patients should receive additional screening?
- Which accounts should receive a retention offer?
ROC may tell us whether the model separates classes well overall.
Lift helps translate that ranking into targeting value.
Lift Curve in Python
The basic logic is straightforward.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def plot_lift_curve(y_true, y_prob, step=0.01):
data = pd.DataFrame({
"actual": y_true,
"probability": y_prob
}).sort_values("probability", ascending=False)
baseline_rate = data["actual"].mean()
population = np.arange(step, 1 + step, step)
lift = []
for fraction in population:
n = int(np.ceil(fraction * len(data)))
selected = data.iloc[:n]
selected_rate = selected["actual"].mean()
lift.append(selected_rate / baseline_rate)
plt.plot(population, lift)
plt.axhline(1)
plt.xlabel("Proportion of population")
plt.ylabel("Lift")
plt.title("Lift Curve")
plt.show()
For a scikit-learn classifier, obtain the positive-class probabilities with something like:
y_prob = model.predict_proba(X_test)[:, 1]
and then:
plot_lift_curve(y_test, y_prob)
Evaluate on data that did not influence model fitting or selection. Choose the targeting fraction using validation data, then report final test performance. For time-ordered or grouped observations, use the cross-validation and leakage guide; the broader model-evaluation checklist explains how baselines, splits and metrics fit together.
When Should You Use a Lift Curve?
Lift curves are particularly valuable when your model is used to rank a population and resources are limited.
Marketing
Identify customers most likely to respond to a campaign.
Churn
Prioritize customers most likely to leave for retention actions.
Credit risk
Concentrate review on accounts with the highest predicted risk.
Fraud
Prioritize transactions for investigation.
Healthcare
Rank patients for additional screening or intervention when appropriate.
In all these examples, the practical question isn’t simply:
Is my model accurate?
It’s:
How much value do I get by acting first on the cases my model ranks highest?
That’s exactly the question lift helps answer.
The Key Idea
You don’t need to memorize every detail of the curve.
Remember this:
Lift tells you how much better your model is at concentrating positive cases than random selection.
A lift of 4 among the top 10% means that group contains positives at four times the population’s average rate.
The higher the lift in the part of the population you can realistically target, the more useful the ranking can be.
And like every ML evaluation technique, lift shouldn’t be used alone.
Combine it with metrics such as ROC AUC, precision and recall, calibration (see the Brier score) and metrics tailored to the actual cost of mistakes in your problem.
Learning How to Evaluate Machine Learning Models?
Lift is one of many evaluation techniques you’ll encounter as you move from training models to understanding whether they’re actually useful.
Our Free 90-Day Machine Learning Roadmap organizes those concepts into a step-by-step path—from Python and ML fundamentals to model evaluation, projects and deployment.
→ Follow the Free 90-Day Machine Learning Roadmap
Want to practise this hands-on? The ML Starter Kit takes you from setup to a deployed model in 26 chapters with code that actually ran. Chapter 13, Evaluating a Model Honestly, covers model evaluation step by step.
Additional Resources:
- Lift Analysis – A Data Scientist’s Secret Weapon
- Cumulative Gains and Lift Curves: Measuring the Performance of a Marketing Campaign
- The ROC Curve in Machine Learning
- The Confusion Matrix in Python
- Review of the Python for Data Science Handbook
Tags: Lift Machine Learning, Lift Curve, Lift Chart Machine Learning, Lift Metric Machine Learning, Machine Learning Lift, Curve Lift.
Subscribe to our awesome newsletter to get the best content on your journey to learn Machine Learning, including some exclusive free goodies!



