This repository contains a project that focuses on predicting the delivery time for orders based on distance and the number of items per trip using an LSTM (Long Short-Term Memory) model.
The project involves analyzing a dataset that provides information about dispatch time, customer location, longitude, latitude, trip ID, and courier ID. The dataset is cleaned and processed to calculate the distance between the store's location and the customer's location, as well as the number of items per trip.
To run this project, the following dependencies are required:
- pandas version: 2.0.1
- numpy version: 1.24.3
- plotly.express
- scikit-learn
- keras
Please make sure you have the necessary dependencies installed before executing the code.
To get started with this project, follow these steps:
-
Clone the repository or download the code files.
-
Install the required dependencies using the following command:
pip install -r requirements.txt
-
Set the path to the CSV file containing the dataset in the
csv_file_path
variable in the code.
Follow these instructions to use the project:
-
Run the
main.py
file. -
The program will read the dataset from the CSV file and perform data cleaning and preprocessing.
-
It will then generate scatter plots to visualize the relationship between time taken and distance, as well as the relationship between time taken and the number of items per trip.
-
The generated graphs will be displayed as follows:
-
Next, an LSTM model will be built to make predictions.
-
The model will be trained using the dataset, and the training progress will be displayed.
-
After training, the program will prompt you to enter a distance and the number of items per trip.
-
The LSTM model will use the provided input to predict the estimated delivery time.
-
The estimated delivery time will be displayed on the console.