SDE & MLE Prep

ETA Prediction (Maps / Food Delivery)

Goal: predict arrival time accurately (MAE / percentile errors) at request time, < 50 ms.

  • Features: route segments with real-time speeds (from GPS probes), historical speeds by time-of-week, weather, events, road type; for delivery: restaurant prep time, courier state.
  • Model: route-level baseline = sum of segment times (graph routing) + ML correction (GBDT or GNN over road graph); quantile regression for P90 promises.
  • Training data: completed trips (label = actual duration); watch for distribution shift (holidays, construction).
  • Serving: precompute segment speeds every minute in a streaming job; cache popular routes.
  • Metrics: MAE, MAPE, % within ±2 min, calibration of P90 (late rate ≈ 10%).