Machine Learning Algorithm for Delivery Estimation at Swiggy
Machine Learning Algorithm for Delivery Estimation at Swiggy
by Kritika Singh
Introduction to Swiggy's Delivery Estimation
Challenge
The Challenge Factors Influencing Delivery Times
Swiggy, India's leading online food delivery platform, Delivery times are influenced by numerous factors,
faces the challenge of providing accurate and reliable including distance, traffic conditions, restaurant order
delivery time estimates to its customers. This is crucial preparation time, and delivery driver availability. These
for customer satisfaction and trust. factors are dynamic and unpredictable, making it
difficult to estimate delivery times with precision.
Defining the Problem
Statement and Business
Objectives
1 Problem Statement 2 Business Objectives
To develop a machine Improve customer
learning model that satisfaction by providing
predicts accurate delivery accurate delivery time
time estimates for Swiggy estimates.
orders.
A comprehensive analysis of Swiggy's historical order New features were created by combining and
data was conducted to understand the key factors transforming existing data, including distance, time of
influencing delivery times. day, restaurant popularity, and traffic conditions.
Selecting the Appropriate ML Algorithm
Regression Algorithms
Linear Regression, Random Forest Regression, Gradient Boosting Machines
1 (GBM)
Neural Networks
2
Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM)
Final Choice
Gradient Boosting Machines (GBM) were chosen due to
3
their ability to handle complex relationships and high
accuracy.
Model Training and
Hyperparameter Tuning
Training Data
The model was trained on a massive dataset of historical
order data, labeled with actual delivery times.
Hyperparameter Optimization
Hyperparameters, such as the learning rate and tree
depth, were tuned to optimize the model's performance.
Cross-Validation
Cross-validation techniques were employed to ensure the
model's generalizability and prevent overfitting.
Evaluating Model
Performance and Iterating
Metrics Iteration
The model's performance Based on the evaluation
was evaluated using metrics results, the model was
such as mean absolute error iteratively improved by
(MAE), root mean squared refining features, adjusting
error (RMSE), and R- hyperparameters, and
squared. exploring alternative
algorithms.
Deploying the Model into
Production
Real-Time Predictions
The model now provides real-time
delivery time estimates to
customers during the ordering
process.
Monitoring and Maintaining
the Model
1 Performance Monitoring
The model's performance is continuously monitored to
identify any drifts or changes in accuracy.
2 Data Updates
The model is retrained periodically with new data to
ensure its accuracy remains current and relevant.
3 Model Maintenance
Regular maintenance and updates are performed to
address any performance issues or changes in the
environment.
Lessons Learned and Future
Improvements
1 2
Data Quality Feature Engineering
The quality of data is critical for model Creative feature engineering can
accuracy. Ensuring clean and significantly improve model
comprehensive data is essential for performance. Exploring new features
effective model training. and combinations is key.
3 4
Model Explainability Continuous Improvement
Understanding why the model makes Machine learning models are not static.
certain predictions is important for trust Continuous monitoring, retraining, and
and debugging. Techniques like SHAP iteration are essential for optimal
values can help. performance.