How would you design an ETA prediction system?
UberData Scientist · Technical ScreenLast updated
This problem tests the ability to design an end-to-end machine learning system for predicting ride arrival times, focusing on feature selection, model architecture, and evaluation strategies.
Problem Statement
You are tasked with designing an Estimated Time of Arrival (ETA) prediction system for a ride-sharing application. The system must predict the travel time (in minutes) from a passenger's pickup location to their destination.
Requirements
- Data Sources: What historical and real-time data would you collect to train and serve this model?
- Feature Engineering: Propose at least four distinct features that capture spatio-temporal trends and external factors (e.g., weather or traffic).
- Model Selection: Choose an appropriate model architecture. Justify why a linear model, a tree-based ensemble, or a deep learning approach might be preferred.
- Evaluation: Define the key metrics to measure performance. How would you handle outliers, such as trips delayed by accidents?
- Serving: Briefly describe how you would handle low-latency inference requirements for millions of concurrent requests.
Assumptions
- You have access to historical GPS traces, road network graphs, and weather API data.
- The system must provide predictions in under 100ms.
Deliverables
Provide a high-level design document covering the data pipeline, the model approach, and the evaluation strategy.
Hints
Hint 1
Consider how traffic patterns vary not just by time of day, but by the day of the week or local holidays.
Hint 2
Think about the difference between 'offline' training metrics (like RMSE) and 'online' business metrics (like the percentage of accurate arrivals).
Hint 3
Account for the fact that road networks are graphs; consider how graph-based embeddings or segment-level features could improve accuracy.
Follow-up questions
- How would you handle cold-start problems for new routes or areas with very little historical data?
- If the model shows a systematic bias—such as consistently underestimating travel times during rush hour—how would you diagnose and fix it?
- How would you implement an A/B test to determine if your new model version is better than the existing one?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.