How would you evaluate a logistic regression model in the context of a recommendation system?

Quick Overview

Explain how to evaluate a logistic regression model that predicts clicks or purchases and ranks items in a recommendation system. Tests knowledge of top-k ranking metrics such as NDCG, probability calibration, class imbalance, leakage-safe validation and online A/B testing.

How would you evaluate a logistic regression model in the context of a recommendation system?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How would you evaluate a logistic regression model in the context of a recommendation system? Assume the model scores each user and item pair with the probability of a click or purchase, and the highest-scored items are shown to the user. ```hint What the user sees Users only look at the first few items in the list. Which metrics reflect that, and which ones check the probability values themselves? ``` ```hint How the data was collected The logged clicks came from whatever system was showing recommendations at the time. Think about what that does to your offline split and to the labels. ``` ### What a Strong Answer Covers - Ranking metrics that match a top-k list (`NDCG@k`, `Precision@k`, `MAP@k`, per-user AUC), computed per user and then averaged. - Calibration checks (log loss, Brier score, reliability curves) and why they matter when scores feed bidding or blending. - Why accuracy is misleading at low click rates, and what to use instead. - An offline protocol that avoids leakage (a time-based split) and accounts for position and selection bias in logged data. - Online validation with an A/B test on CTR, conversion or revenue, with guardrail metrics. ### Follow-up Questions - Offline AUC improved, but the A/B test shows no lift in CTR. What could explain it? - You trained with negatives downsampled to 10%. How do you correct the predicted probabilities before they go into ad bidding? - How would you evaluate the model for new users or new items with little history? - How would you measure diversity or catalog coverage, and when would you give up some NDCG for it?

Overview: Explain how to evaluate a logistic regression model that predicts clicks or purchases and ranks items in a recommendation system. Tests knowledge of top-k ranking metrics such as NDCG, probability calibration, class imbalance, leakage-safe validation and online A/B testing.

General logo
General
Nov 24, 2026
mediumData ScientistOtherMachine Learning
0
0

How would you evaluate a logistic regression model in the context of a recommendation system?

Assume the model scores each user and item pair with the probability of a click or purchase, and the highest-scored items are shown to the user.

What a Strong Answer Covers Guidance

  • Ranking metrics that match a top-k list ( NDCG@k , Precision@k , MAP@k , per-user AUC), computed per user and then averaged.
  • Calibration checks (log loss, Brier score, reliability curves) and why they matter when scores feed bidding or blending.
  • Why accuracy is misleading at low click rates, and what to use instead.
  • An offline protocol that avoids leakage (a time-based split) and accounts for position and selection bias in logged data.
  • Online validation with an A/B test on CTR, conversion or revenue, with guardrail metrics.

Follow-up Questions Guidance

  • Offline AUC improved, but the A/B test shows no lift in CTR. What could explain it?
  • You trained with negatives downsampled to 10%. How do you correct the predicted probabilities before they go into ad bidding?
  • How would you evaluate the model for new users or new items with little history?
  • How would you measure diversity or catalog coverage, and when would you give up some NDCG for it?