
Traffic Flow Prediction
Using Linear Algebra & Machine Learning Techniques
Project Overview
Built an interpretable traffic forecasting system using linear algebra–based models to predict hourly vehicle volume on Interstate 94 (Twin Cities, Minnesota). The goal was to design mathematically sound, explainable models instead of black-box deep learning, making it suitable for Intelligent Transportation Systems (ITS), signal optimization, and infrastructure planning.
- Time-series modeling
- Matrix-based optimization
- Feature engineering
- Model interpretability
Problem Context
- Urban traffic congestion leads to longer travel times, higher fuel consumption, and increased air pollution.
- Accurate traffic prediction enables traffic control, route optimization, emergency response, and smarter infrastructure decisions.
Methodology
1️⃣ Least Squares Regression (LSR)
Modeled traffic volume using lag-based linear regression:
yₜ = B₀ + B₁yₜ₋₁ + B₂yₜ₋₂ + ϵ
- Captures autocorrelation
- Interpretable coefficients
- Mathematically grounded
2️⃣ Discrete Dynamic System (DDS)
Modeled traffic as a recursive system:
xₜ₊₁ = A · xₜ
- Simple scalar transition model
- Explains system behavior
- Good for conceptual understanding
Feature Engineering
- Converted timestamp to datetime
- Extracted: hour, day_of_week, month
- One-hot encoded: holiday, weather_main
- Normalized: temperature, rain, cloud coverage
- Created lag features (lag_1, lag_2)
Tech Stack
- Python
- Pandas
- NumPy (matrix operations)
- Scikit-learn
- Matplotlib
- Seaborn
Core Skills: Linear algebra, optimization, time-series forecasting, feature engineering, model evaluation (MAE, RMSE, R²), end-to-end ML pipeline design.