Creating a system for more effective assignment of the available drivers to the new food orders was the main goal of this project. When a client orders food, the system sets the sequence in which drivers will receive order notifications. Before starting the project, the system took into account only two factors: the distance between the driver and the target address and the driver’s rating – the company’s internal way of assessing drivers.
Diving deep into data analysis is great fun. During this project, we were able to find new dependencies in data and relationships between key features of the dataset that were valuable to the customer. This always brings satisfaction to both sides of the business.
Tomasz Juszczyszyn, Data Scientist, Stermedia
The driver has 15 seconds to answer whether they take on the task. If they do not, the query goes to the next one. Everything sounds great, but many potential clients hung up while waiting for a delivery man to be allocated. Even the progress bar in the mobile application did not encourage them to stay on the line.
The business challenge was to find available drivers as quickly as possible. Our client also wanted an improved system that would assess the likelihood that a given driver would take the job.
Our task was to improve the sequence in which orders notifications were sent to drivers using AI (artificial intelligence). A database we received from a company contained information on 1.5 million routes. We also had access to anonymized data on the company’s clients, such as geographical coordinates, time of the order placement, and distance to the driver. Each order in the database had a status “accepted” or “not accepted”.
We enriched the received data with important information. For example, we added the information on whether the course we offer to the driver has not been previously rejected by them, whether the car on a given day did not break down or whether the driver usually rejects long routes.
We originally assumed the application of the prediction method from the area of decision trees – Gradient Boosting Decision Trees – read more about this method on our blog. However, the client wanted to check several models and methods, so we compared our initial approach with logistic regression and neural networks. To this end, we tested the machine learning model trained on 80% of the data. When the training was finished, we verified the model’s quality using the remaining 20%. Ultimately, the algorithm we proposed at the beginning, Gradient Boosting Decision Trees, turned out to give the best results. We chose it as a final solution.
In addition to the previously described method, we took into account a new aspect that turned out to be a game-changer. It was the percentage of the orders the driver accepted on a given day. If someone has already received many courses on a given day, then the system began to allocate more orders to them. If someone took 5-7 orders on a given day, there is a greater chance that they will take another. The result we achieved using this enhanced model was an increase in the number of accepted orders by 10%.
Machine learning – Gradient Boosting Decision Trees algorithm
Production implementation in the AWS cloud architecture
Are you inspired?
Let’s talk about your idea.