DoorDash: Predict order arrival times using stacked regression with prep-time decomposition. Python, LGBM, Scikit-learn, Keras.
When a consumer places an order on DoorDash, we show the expected time of delivery. 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.
Concretely, for a given delivery you must predict the total delivery duration seconds , i.e., the time taken from
created_at) toactual_delivery_time)The attached file historical_data.csv contains a subset of deliveries received at DoorDash in early 2015 in a subset of the cities. Each row in this file corresponds to one unique delivery. We have added noise to the dataset to obfuscate certain business details. Each column corresponds to a feature as explained below. Note all money (dollar) values given in the data are in cents and all time duration values given are in seconds
The target value to predict here is the total seconds value between created_at and actual_delivery_time.
Time features
market_id: A city/region in which DoorDash operates, e.g., Los Angeles, given in the data as an idcreated_at: Timestamp in UTC when the order was submitted by the consumer to DoorDash. (Note this timestamp is in UTC, but in case you need it, the actual timezone of the region was US/Pacific)actual_delivery_time: Timestamp in UTC when the order was delivered to the consumerStore features
store_id: an id representing the restaurant the order was submitted forstore_primary_category: cuisine category of the restaurant, e.g., italian, asianorder_protocol: a store can receive orders from DoorDash through many modes. This field represents an id denoting the protocolOrder features
total_items: total number of items in the ordersubtotal: total value of the order submitted (in cents)num_distinct_items: number of distinct items included in the ordermin_item_price: price of the item with the least cost in the order (in cents)max_item_price: price of the item with the highest cost in the order (in cents)Market features
DoorDash being a marketplace, we have information on the state of marketplace when the order is placed, that can be used to estimate delivery time. The following features are values at the time of created_at (order submission time):
total_onshift_dashers: Number of available dashers who are within 10 miles of the store at the time of order creationtotal_busy_dashers: Subset of above total_onshift_dashers who are currently working on an ordertotal_outstanding_orders: Number of orders within 10 miles of this order that are currently being processed.Predictions from other models
We have predictions from other models for various stages of delivery process that we can use:
estimated_order_place_duration: Estimated time for the restaurant to receive the order from DoorDash (in seconds)estimated_store_to_consumer_driving_duration: Estimated travel time between store and consumer (in seconds)Build a model to predict the total delivery duration seconds (as defined above). Feel free to generate additional features from the given data to improve model performance. Explain:
We expect the project to take 3-5 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.
See the full interview round by round, with questions for each stage.