The Food Delivery Time Prediction Model aims to estimate the time required for food to be delivered to customers accurately. By providing precise delivery time predictions, the model enhances customer experience, optimizes delivery logistics, and improves overall operational efficiency for food delivery platforms.
• Gathered the food delivery dataset from the provided data source and The dataset used for this project is located in the dataset folder and includes order details, location, city, delivery person information, weather conditions, and actual delivery times.
• Data Cleaning: Handled missing values, outliers, and inconsistencies in the dataset. • Feature Engineering: Extracted relevant features for the prediction model.
• Utilized regression algorithms to train the food delivery time prediction model. • Explored models such as Linear Regression, Decision Trees, Random Forests, and XGBoost to determine the best-performing model.
• Evaluated model performance using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R-squared (R²) score.
• Deployed the food delivery time prediction model as a standalone application using Streamlit. • Integrated OpenCage API for geolocation functionality in the application.
• The application uses the OpenCage API for geolocation to convert addresses into latitude and longitude, with the relevant code snippet located in the main.py file.
• Programming Language: Python
• Development Environment: Jupyter
• Application Framework: Streamlit
• Pandas
• NumPy
• Scikit-learn
• Matplotlib
• Seaborn
• XGBoost
• Dataset: Food-Delivery-Time-Prediction-Using-Machine-Learning.ipynb
• Location Finder API: Location_finder_api.ipynb
• Deployment Script: main.py
• Model: model.pkl
• Scaler: scaler.pkl
• Requirements: requirements.txt
-
Data Collection:
• Gathered the food delivery dataset from the provided data source.
-
Data Preprocessing:
• Data cleaning to handle missing values, outliers, and inconsistencies.
• Feature engineering to extract relevant features.
-
Model Development:
• Trained various regression models including Linear Regression, Decision Trees, Random Forests, and XGBoost.
-
Model Evaluation:
• Used metrics such as MSE, RMSE, and R² score to evaluate model performance.
-
Deployment:
• Deployed the model using Streamlit for real-time predictions. Follow the steps above to run the application.
To run the deployed application, follow these steps:
-
Install Streamlit: Ensure that Streamlit is installed. You can install it using pip:
pip install streamlit
-
Run the Application: Navigate to the project directory and run the following command in the terminal:
streamlit run main.py
• Best-Performing Model: XGBoost
• R-squared (R²) Score: 0.82
• Incorporate additional features related to delivery partners, weather conditions, or traffic patterns to enhance prediction accuracy.
• Conduct more comprehensive data analysis to identify additional patterns or correlations.
• Fine-tune model parameters to potentially improve performance.
Author: https://www.linkedin.com/in/kaushik-puttaswamy-data-analyst/