Decoding an E-Commerce Delivery Crisis
An international e-commerce company had nearly 60% of shipments arriving late. Five machine learning models later, the real finding wasn't a prediction — it was a diagnosis.
In a market shaped by next-day delivery expectations, logistics is customer retention. The brief was simple on paper: build a model to predict which packages would be delayed so the supply chain team could act proactively. What the data revealed was a far more complex picture.
Explore the Power BI dashboard
Having trouble viewing it? Open the dashboard directly.
When the model's failure became the finding
Feature engineering
Cleaned shipment data covering mode of shipment (flight, ship, road), warehouse block, product weight, and customer importance rating; one-hot encoded the categoricals and scaled the numeric features.
Testing a spectrum of models
Started with baseline distance and linear models — k-NN and SVM — to understand how the data behaved fundamentally, then escalated to the industry-standard ensemble methods: Random Forest, Gradient Boosting, and XGBoost.
Hitting a hard ceiling
Every model, from the simplest to the most sophisticated, plateaued around 63–67% accuracy. Testing five genuinely different mathematical approaches and landing on the same wall is itself a signal: the delays weren't following a learnable pattern from the available variables — the operation was in a state of chronic, structural chaos, not a chaos a smarter algorithm could untangle.
Mapping the chaos in Power BI
If the machine can't predict the disorder with confidence, the next move is to map where it's concentrated so the business can act directly on the source.
The VIP Paradox
- "High importance" shipments were the most delayed. Nearly 65% late — the deliveries that should get the most care were getting the least reliable treatment.
- Air freight had the worst delay rate of any shipping mode — over 60%, despite being the premium, express-cost option.
- Warehouse Block B was the single biggest bottleneck, with a delay rate above 60%, closely followed by two other blocks — pointing to a breakdown in internal workflow management at specific hubs.
True analysis doesn't stop at model.fit() — it stops when the business makes a decision. Here, that meant redirecting the company's strategy away from deploying a predictive algorithm and toward an emergency warehouse audit and renegotiated SLAs with air-freight carriers. A 67% accuracy ceiling didn't fail to predict the future; it successfully diagnosed a broken present.