internalsGet Pro

Module 12 · Lesson 5 of 12Pro

Ranking metrics: NDCG, MAP and recall at k

Level
Intermediate
Topic
Model evaluation and experimentation
Reading time
16 min

When you finish this page you can

  1. Compute precision and recall at k, reciprocal rank, average precision and NDCG for one ranked list by hand and in NumPy.
  2. Explain which positions and which kinds of hit each metric rewards, and pick the one that matches what a customer sees.
  3. Set up an offline ranking evaluation with a time-based split, per-customer scores and an honest average.
  4. Treat a top-k list cut by a budget, such as a voucher list, as a ranking problem with its own metric.
  1. Learned embeddings: vectors for words, items and users18 min
  2. Precision and recall: two ways to be wrong13 min
  3. ROC and precision-recall curves17 min

Video lesson · coming soon

Same hits, different rows

is our example online store. Its ML team works on a notebook sample: about 1 million orders from 200,000 customers across 50,000 products. Joseph, who leads the growth team, owns the “Picked for you” row on the home page. It shows each customer 10 products, best first.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan