Skip to content

An Aggregation Approach to Short-Term Traffic Flow Prediction , where I explored how different traffic conditions contribute to urban noise pollution and built predictive models to estimate noise levels.

Notifications You must be signed in to change notification settings

Ajay9704/traffic-flow-prediction

Repository files navigation

🚦 Traffic Flow & Noise Prediction using Machine Learning

Hi, I’m Ajay 👋
This repository contains my project “An Aggregation Approach to Short-Term Traffic Flow Prediction”, where I explored how different traffic conditions contribute to urban noise pollution and built predictive models to estimate noise levels.


🔍 Project Overview

Urban noise pollution is one of the most disruptive challenges in modern cities. In this project, I set out to:

  • Analyze real-world traffic data (vehicle types, road setups, time-of-day effects).
  • Identify key factors contributing to noise levels.
  • Compare multiple machine learning models for predictive accuracy.
  • Deploy the most effective model for potential use in smart city applications.

🛠️ Tech Stack

  • Python
  • NumPy, Pandas – data preprocessing
  • Matplotlib, Seaborn – visualization
  • Scikit-learn – baseline ML models
  • XGBoost – final deployed model

📊 Model Performance

I tested a wide range of algorithms, from simple regressions to ensemble methods and neural networks.

Model R² Score
Gradient Boosting 0.9989
XGBoost (Final) 0.9986
Random Forest 0.9985
Linear Regression 0.944
Neural Network -101.24
  • XGBoost was chosen for its balance of accuracy, speed, and scalability.
  • Neural networks surprisingly overfitted and failed, reminding me that complexity isn’t always better.

🌟 Key Insights

  • Heavy vehicles and narrow lanes significantly increase noise levels.
  • Morning and evening rush hours show distinct noise patterns.
  • Some features (e.g., Leq, Vehicle Count) had much stronger influence than others.
  • Simple metrics like traffic density (vehicles per meter) proved to be powerful predictors.

🚀 Future Work

  • Fine-tune hyperparameters of XGBoost.
  • Build a web demo to visualize predictions interactively.
  • Incorporate additional features like weather conditions and road surfaces for better accuracy.

📌 How to Run

# Clone the repository
git clone https://github.com/ajay9704/traffic-flow-prediction.git

# Navigate into the project
cd traffic-flow-prediction

# Install dependencies
pip install -r requirements.txt

# Run the model
python main.py

📬 Connect with Me


✨ Thanks for checking out my project! If you find it interesting, feel free to ⭐ this repo.

About

An Aggregation Approach to Short-Term Traffic Flow Prediction , where I explored how different traffic conditions contribute to urban noise pollution and built predictive models to estimate noise levels.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages