DoorDash Delivery Duration Prediction Take-Home
Machine learning take-home to predict total delivery duration from historical DoorDash order data and build an application that scores new deliveries from JSON input and outputs predictions. Submission contains the prompt PDF, historical/train and prediction datasets, data description, a candidate summary write-up, and a README with run instructions referencing missing code assets.
Overview
In this exercise, you will use your machine learning experience to solve a straightforward but challenging prediction problem. The exercise contains two parts:
- Building a machine learning model for a prediction task
- Writing an application to make predictions using that model
In Part 1, you will be evaluated on:
- Performance on the test set
- Feature engineering choices, including features used and encoding of features
- Data processing
- Choice of models used
- Description of model performance and insights and observations from the model
In Part 2, you will be evaluated on:
- Performance of the application
- Adherence to common software engineering patterns (unit tests, modular code, etc.)
- Ability to make educated trade-offs based on the given constraints
Note: For this part, you must use a production-ready language like Python, Java, C++, Scala, Ruby, etc.
Problem Description
When a consumer places an order on DoorDash, the expected time of delivery is shown. It is very important for DoorDash to get this right, as it has a big impact on consumer experience. In this exercise, you will build a model to predict the estimated time taken for a delivery and write an application that can make these predictions.
Concretely, for a given delivery you must predict the total delivery duration in seconds, i.e. the time taken from:
- Start: the time the consumer submits the order (
created_at) - End: when the order will be delivered to the consumer (
actual_delivery_time)
To help with this, the following files are provided:
historical_data.csv: table of historical deliveriesdata_to_predict.json: JSON list of deliveries that you must predict on (for the second part)data_description.txt: description of all columns inhistorical_data.csvand details ofdata_to_predict.json
Requirements
Part 1
- Build a model to predict the total delivery duration in seconds as defined above. Feel free to generate additional features from the given data to improve model performance.
- Explain:
- the model(s) used
- how you evaluated your model performance on the historical data
- any data processing you performed on the data
- feature engineering choices you made
- any other information you would like to share about your modeling approach
- Based on the findings from the model, list recommendations to reduce delivery time.
Part 2
- Write an application that accepts data from the JSON file (
data_to_predict.json), uses the model to make a prediction for each delivery in the JSON file, and writes out predictions to a new tab-separated file with columns:delivery_idpredicted_delivery_seconds
- Your predictions on this test data set will be evaluated using RMSE (Root Mean Squared Error), and your score must exceed a baseline set for the task.
- Note: For this part, you must use a production-ready language like Python, Java, C++, Scala, Ruby, etc.
Deliverables
Submit exactly one PDF file that includes:
- A write-up explaining your model, choices made, and discussion on the questions above
- The code used for Part 1
- The application code for Part 2, including instructions for running it (dependencies, packages required, etc.)
- The predictions for
data_to_predict.jsonembedded in the PDF as part of the application output
Your application code must be runnable from the command line with data_to_predict.json passed as input. Any code included in the PDF must be executable so it can regenerate the required outputs.
Notes
- We expect the exercise to take 5-6 hours in total, but feel free to spend as much time as you like on it.
- Feel free to use any open source packages for the task.
- Thank you for your hard work! Please let us know if you have any questions. Good luck!