Delivery-Date Prediction

Matthias Mozer13 Apr 2023

Problem

Wayfair shows every shopper a promised delivery time on the product page. Shorter promises raise the chance of a purchase. A missed promise lowers satisfaction and the willingness to buy again. The old method summed contractual supplier lead times and other components and added padding in several places. It could not capture correlations between the components. It also depended on hand-curated inputs for five-digit counts of suppliers and warehouses.

Example from the article: a product page for a pillow states how many days delivery will take, and that number is recomputed on every page load for the customer's address and the current time of day.

Solution in brief

Predict the whole path from order placement to delivery with one gradient boosted trees model trained on a quantile loss, so the output is a promise that is met at a chosen share of orders. Features that make similar orders look alike (recent supplier shipping time, warehouse-to-customer distance) matter more than the model itself. The promised-to-actual gap fell by about half at a similar delivery rate.

Questions this case answers
  • How to predict a promised completion time so that it is as short as possible at a fixed on-time rate, when the existing estimate is a sum of hand-padded components
  • How to serve a tree-ensemble prediction in a few dozen milliseconds for nearly every request when features need look-ups
  • How to shorten the delivery date promised on a product page without lowering the share of orders that arrive on time?
  • How to replace a sum of hand-tuned delivery components with one end-to-end delivery-time model?

Tools and methods

  • Quantile regression loss — aligns training with the goal of a target delivery rate.
  • Gradient boosted trees (CatBoost) — fast tabular model with good categorical handling and sensible defaults.
  • Recency weighting — balances a long lookback with reactivity to new trends.
  • A/B test — final pre-rollout check of promise length and delivery rate.
Continue reading — it's free

Google or a one-time email code. No password.