Skip to content

Machine Learning

E-commerce Delivery Prediction & Logistics Analytics

A machine-learning and geospatial study of 113,270 e-commerce orders that predicts delivery status with 95% accuracy by combining order data with latitude/longitude across 52 states.

Demonstration2024
All projects
E-commerce Delivery Prediction & Logistics Analytics

Problem

E-commerce delivery status is multi-class and geographically complex, with late deliveries only ~4.4% of orders — a classic imbalanced-classification and data-integration challenge.

Objectives

  • Predict delivery status across four classes.
  • Integrate order data with geographic coordinates for 52 states.
  • Identify the factors that drive delivery performance.

My role

Data engineering, feature engineering, modelling and evaluation.

Methodology

  1. 01Merged order records with geolocation data and standardised dates and identifiers.
  2. 02Label-encoded categoricals, scaled numerics and selected ~15 informative features.
  3. 03Trained a 100-estimator Random Forest with an 80/20 split and multi-class evaluation.

Outcome

The model reached 95% overall accuracy, with high precision on advance/on-time classes and honest reporting of the hard-to-predict late-delivery class (~35%). Geography proved a real driver of delivery performance.

Challenges

A strongly imbalanced 'late' class that no single accuracy number could represent fairly.

Lessons learned

On imbalanced problems, per-class precision and recall tell the truth that overall accuracy hides.