Skip to content

kashyaputsav/Delivery-Time-Estimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚚 Delivery Time Estimator (Food Delivery Prediction System)

Project Duration: Jan 2026
Domain: Machine Learning, Predictive Analytics, Logistics Optimization
Tech Stack: Python, Scikit-learn, Pandas, NumPy, Matplotlib, Seaborn, Flask, Jupyter Notebook


📌 Project Overview

Modern food delivery platforms like Swiggy, Zomato, and Uber Eats rely on intelligent prediction systems to estimate delivery time accurately. This project builds a real-world machine learning regression system that predicts food delivery duration using operational, order-level, and partner availability features.

The system processes structured order data and operational signals to predict delivery time in minutes. It is designed with scalability and deployment readiness in mind, simulating real-world logistics optimization systems.


🎯 Key Objectives

  • Predict delivery time accurately using operational features
  • Analyze impact of partner availability & order load
  • Build an end-to-end ML pipeline (EDA → Training → Evaluation → Deployment)
  • Design the system to be API-deployable

🧠 Problem Statement

Accurate delivery time prediction is critical for:

  • Customer satisfaction
  • Operational efficiency
  • Delivery partner optimization
  • Platform trust & retention

Static time estimates fail to account for:

  • Order complexity
  • Store workload
  • Partner availability
  • Demand fluctuations

The goal is to build a regression-based ML system that dynamically predicts delivery duration based on real-world operational factors.


📊 Dataset Description

The dataset represents structured operational and order-level features from a food delivery platform.

🔢 Dataset Size

~180,000+ order records
Supervised Regression Problem

🧾 Feature Overview

Order-Level Features

  • total_items
  • subtotal
  • num_distinct_items
  • min_item_price
  • max_item_price

Operational Features

  • total_onshift_partners
  • total_busy_partners
  • total_outstanding_orders

Engineered Features

  • Encoded store category signals
  • Derived operational metrics

🎯 Target Variable

  • delivery_time (Actual delivery duration in minutes)

🔧 Feature Engineering

1️⃣ Data Preprocessing

  • Removed irrelevant columns
  • Handled missing values
  • Converted timestamp columns
  • Encoded categorical features
  • Outlier inspection

2️⃣ Operational Feature Analysis

  • Analyzed workload vs delivery delay
  • Studied partner availability impact
  • Explored demand patterns

3️⃣ Feature Optimization

  • Correlation-based feature selection
  • Train-test split preparation
  • Structured pipeline alignment

🤖 Model Architecture

Model Type: Regression (Scikit-learn)

Why Regression?

  • Delivery time is continuous
  • Requires error minimization
  • Suitable for operational forecasting

Training Pipeline

  • Train-test split
  • Model fitting
  • Performance evaluation
  • Error analysis

📈 Model Evaluation

Evaluation Metrics Used:

  • MAE (Mean Absolute Error)

This provides a strong baseline model with scope for further improvement using ensemble techniques.


🚀 Inference & Deployment Ready

The project supports deployment via:

  • Flask API
  • Saved trained model (model.pkl)
  • Input-based prediction pipeline

This mirrors real-world ML deployment patterns used in logistics and delivery platforms.


📁 Project Structure

Delivery-Time-Estimator/

│ ├── Delivery-Time-Estimator.ipynb ├── model.pkl ├── app.py ├── requirements.txt └── README.md


▶️ How to Run the Project

1️⃣ Install Dependencies

2️⃣ Run Jupyter Notebook

Open Delivery-Time-Estimator.ipynb for training and evaluation.

3️⃣ Run API (If Implemented)

💡 Real-World Impact

This project aligns with:

Swiggy / Zomato ETA prediction

Logistics optimization systems

E-commerce last-mile delivery forecasting

AI-driven operational decision systems

It demonstrates:

End-to-end ML workflow

Structured data modeling

Operational feature engineering

Deployment-ready ML design

🔮 Future Improvements

XGBoost / LightGBM integration

Hyperparameter tuning (GridSearch / RandomSearch)

Cross-validation

Feature interaction engineering

Real-time streaming integration

Docker + CI/CD MLOps pipeline

Author

Utsav Kashyap Data Scientist Machine Learning | Backend | Predictive Systems

📧 kashyap.utsav2001@gmail.com

🔗 LinkedIn: https://www.linkedin.com/in/utsav-kashyap-581550236/

💻 GitHub: https://github.com/kashyaputsav

About

Built a Random Forest–based machine learning model to predict Porter delivery times using engineered features and evaluated performance using MAE.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages