Notes

Cumulative Gains Curve

If your model ranks customers by “likelihood to buy” or “risk of fraud,” you usually don’t care about a single yes/no cutoff at first—you care about how much value you get as you work down that ranked list. A Cumulative Gains Curve is a simple way to visualize that payoff.

What it shows

A cumulative gains curve is used in binary classification when you can sort examples by a model score (highest predicted probability first). On the x-axis you take the top k% of the population (e.g., the top 10%, 20%, …). On the y-axis you plot the cumulative fraction (or count) of all true positives captured within that top slice. It’s compared against a baseline “random selection” diagonal: if you sample 20% of people at random, you expect to capture about 20% of the positives.

How to read it

The curve answers questions like: “If I can only contact 30% of customers, what share of all responders will I reach?” A strong model rises steeply early: the top 10% might contain 40% of all responders. This is closely related to lift: at 10%, the lift is 40% / 10% = 4×.

  • Steeper early = better ranking where it matters operationally.
  • Near the diagonal = little improvement over random targeting.
Why it matters in practice

Teams use gains curves for budgeted actions: fraud review queues, churn retention offers, credit pre-approvals, or marketing campaigns. It helps choose a workable operating point (how deep into the list to go) based on capacity and expected captured positives, without committing to a single classification threshold. In Python, you’ll see this via scikit-learn-compatible tooling such as

sklearn.metrics
plus plotting utilities in packages like scikit-plot.

A Cumulative Gains Curve plots the cumulative proportion of true positives captured as you target an increasing fraction of the population ranked by a model’s predicted score (e.g., top 10%, 20%, …). It visualizes how much better the model is than random selection at concentrating positives early in the ranked list. This matters for thresholding and resource allocation in imbalanced or “top-k” use cases, where capturing the most positives with limited effort is the goal.

Imagine you’re running a charity drive and you can only call a small fraction of people. You make a ranked list of who’s most likely to donate. A Cumulative Gains Curve shows how well that ranking works: as you contact the top 10%, 20%, 30% of your list, how many of all possible donors have you reached so far?

In supervised learning, it’s used to judge models that score or rank cases (like likely fraud, likely buyers, or high-risk patients). A better curve climbs quickly, meaning you capture a large share of the “positives” by looking at only a small slice of the population.