← Lessons

quiz vs the machine

Platinum1800

Machine Learning

Learning To Rank

Train models to order results rather than predict single scores.

6 min read · advanced · beat Platinum to climb

A different goal

In search and recommendation, the order of results matters more than any single predicted score. Learning to rank trains models to produce a good ordering of items for each query or user.

Three families

  • Pointwise predicts a relevance score per item, then sorts. Simple but ignores relative order.
  • Pairwise learns which of two items should rank higher, optimizing correct pair orderings.
  • Listwise optimizes a metric over the whole list directly.

Ranking metrics

  • Normalized discounted cumulative gain rewards placing relevant items near the top.
  • Mean average precision measures precision across the ranked positions.
  • These metrics weight the top positions far more than the bottom.

Why pairwise and listwise win

A pointwise model that nails absolute scores can still order poorly. Pairwise and listwise focus on relative order, which is what the user actually experiences.

Key idea

Learning to rank optimizes the ordering of results, and pairwise or listwise methods often beat pointwise scoring because they target relative order, which is what users see.

Check yourself

Answer to earn rating on the learn ladder.

1. What does learning to rank optimize?

2. Why might pairwise methods beat pointwise?