Choosing a Loss Function for Promised Delivery Time

Last updated: November 29, 2026

Quick Overview

You are training a model whose output becomes the delivery time shown to customers before they order. Explain why plain mean squared error is the wrong objective and what you would use instead.

Zomato
Machine Learning
Machine Learning Engineer
Zomato
November 29, 2026
Machine Learning Engineer
Technical Screen
Machine Learning
Medium

0

0

0 solved


You are training a model whose output becomes the delivery time shown to customers before they order. Explain why plain mean squared error is the wrong objective and what you would use instead.

The ETA Zomato shows on the restaurant listing is a promise that drives conversion when short and complaints when broken. The screen checks whether the candidate links the loss to business asymmetry and can explain quantile regression concretely.

What the Interviewer Expects
  • Explain that MSE predicts the mean and penalizes both directions equally
  • Identify the asymmetric cost of being late versus early
  • Propose quantile (pinball) loss and pick a quantile from costs
  • Discuss calibration checks per segment
  • Note the effect on conversion when promises are padded
Key Topics to Cover
Quantile regression
Pinball loss
Asymmetric costs
Calibration
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How would you pick the quantile from the cost of a late order versus a lost order?
  • Would you show a range like 30 to 35 minutes, and how would you produce it?
  • How do you check the model is calibrated for rainy evenings, not only on average?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

The prediction is shown pre-order, so it affects whether the customer orders (a longer ETA lowers conversion) and whether they are disappointed later (late delivery drives refunds, support contacts an...

Approach

MSE estimates the conditional mean and treats a 5 minute early error the same as 5 minutes late. Delivery times are right-skewed (rain, traffic, kitchen rush), so the mean also gets dragged around by ...


Submit Your Answer
Markdown supported

Related Questions