internalsGet Pro

Module 18 · Lesson 7 of 15Pro

Ad click prediction: sparse features at scale

Level
Advanced
Topic
Applied ML problems
Reading time
18 min

When you finish this page you can

  1. Explain why a click prediction that is multiplied by a bid must be calibrated, and not only ranked well.
  2. Turn IDs with millions of values, and crosses of them, into model inputs with hashing or embeddings, and size the collisions.
  3. Check calibration with the ratio of predicted to actual clicks, per slice, and undo the bias that negative downsampling adds.
  4. Choose between hand-written crosses in logistic regression and a model that learns crosses, and say what would change the choice.
  1. Logistic regression: predicting probabilities13 min
  2. Encoding categories as numbers14 min
  3. Learned embeddings: vectors for words, items and users18 min
  4. Calibration: probabilities you can trust17 min
  5. Ranking features: users, items and context17 min
  6. Multi-objective ranking: clicks, purchases and more17 min

Video lesson · coming soon

A better model that charged the wrong sellers

is the online store this course uses as its example. When a customer searches for “running shoes”, some of the cards in the results are sponsored product cards: a a seller pays for, charged per click. Kartly has more sellers who want those slots than it has slots, so it ranks them. The rule is short: multiply what each seller bids per click by the model’s predicted chance that this customer clicks this card, and show the highest scores.

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