Projects / Traffic, thirty minutes ahead

Machine learning study · 2025

Traffic, thirty minutes ahead

A machine-learning project from the Uber × upGrad MentorMind program that predicts traffic congestion thirty minutes ahead using historical data.

RoleMachine Learning Project MenteeDurationUber × upGrad MentorMindStackPython, Pandas, NumPy, scikit-learn

01 · The problem

Why this was
worth building.

Urban traffic changes across peak hours, weekdays, weekends, seasons, and junctions. Predicting that congestion in advance can support better route planning and smarter transport systems.

02 · What I wanted to achieve

01

Understand traffic patterns before choosing a model

02

Build useful time-based features from historical data

03

Compare models and evaluate thirty-minute forecasts

03 · System architecture

How the pieces
work together.

01Historical traffic dataset↓
02Cleaning and preprocessing↓
03Exploratory data analysis↓
04Feature engineering↓
05Model training and evaluation

04 · Technical decisions

01

Explore before modelling

I used exploratory analysis and visualisations to compare junctions, identify peak-hour behaviour, and understand how traffic changed over time.

02

Engineer time-based features

The forecasting data was prepared with features that represent recurring traffic behaviour across hours, days, and different junctions.

03

Compare prediction models

I trained and evaluated multiple machine-learning approaches rather than relying on the first result, then compared their forecasting performance.

05 · Project targets

30mforecast horizonMultiplecity junctions analysedEnd to endmachine-learning workflow

These are design targets and project measures, not claims about production usage.

Challenge

The hardest part

The most important challenge was finding meaningful patterns in raw historical data. Traffic varied by both time and junction, so preprocessing and exploratory analysis shaped the modelling choices that followed.

Tradeoff

The choice I made

More complex models are not automatically more useful. I compared approaches using evaluation results and interpretability rather than choosing an algorithm only because it was more advanced.

Lesson

What I learned

This project strengthened my understanding of the complete machine-learning pipeline. More importantly, it taught me that good machine learning begins with understanding the data before choosing an algorithm.

06 · What I would build next

The next
iteration.

01

Event and road-closure features

02

Prediction intervals

03

Drift monitoring dashboard