Inspiration

Traffic congestion is a persistent issue that affects many cities and causes a lot of frustration and wasted time for commuters. As data science students, we wanted to explore the use of machine learning algorithms to predict traffic congestion and help alleviate some of the traffic problems in cities.

Learning and Approach

We started by searching for datasets that could be used for this project and found one that provided the average speed on a given road segment for each hour of each day in a specified month. We decided to use this dataset to train a neural network model that could predict traffic congestion based on the average speed, time of day, month, day, and segment ID. To build the model, we used Python and the Keras library for neural networks. We pre-processed the dataset by converting the time of day, month, and day into numerical values and normalizing the average speed data. We then split the dataset into training and testing sets and trained the model using the training set. After training the model, we evaluated its performance using the testing set and calculated various metrics such as accuracy and F1 score. We also experimented with different congestion thresholds to see how they affected the model's performance.

Challenges

One of the challenges We faced during this project was dealing with missing data in the dataset. There were some road segments for which data was missing for certain hours, which could have affected the model's performance. We decided to handle this by imputing the missing data with the average speed for that road segment during that hour on other days in the month. Another challenge was selecting the appropriate machine learning algorithm for the problem. While neural networks were a good choice for this project, we also considered other algorithms such as decision trees and random forests.

Conclusion

Overall, this project was a great learning experience for me. We were able to apply machine learning techniques to a real-world problem and gained experience in data pre-processing, model training, and performance evaluation. While there were some challenges along the way, we were able to overcome them and build a model that could potentially be used to predict traffic congestion and help improve traffic flow in cities.

Coming Up Soon..

In the future ZenDrive would accommodate the location and extract data for each part of the year to build a more accurate model. Further bug-fixes and added features would make it an essential part of daily routine for everyone, from busy new-yorkers to hurrying ambulance drivers.

Built With

Share this project:

Updates