Traffic demand forecasting is often treated as a "deep learning first" problem. However, for the Flipkart GridLock 2.0 Hackathon, I took a different approach: a hierarchical basis-day routing matrix combined with ridge calibration.
The result? A 95.007% R² score that is both computationally efficient and fully interpretable.
The Challenge
The competition (organized by Flipkart and the Bengaluru Traffic Police) required predicting demand on a specific hidden horizon (Day 49). The data included spatial geohashes, temporal timestamps, and road-level metadata.
The Architecture
Instead of a black-box neural network, the pipeline uses four logical stages:
- Proxy Construction: Using non-overlapping Day 49 labels to learn spatial structures.
-
Hierarchical Routing: Fitting simplex-constrained weights across global,
geo_4, andgeo_5granularities. - Ridge Calibration: A linear model trained on the observed early-morning Day 49 slice to adjust for real-time trend shifts.
- Residual Correction: A bounded additive geohash-level fix based on historical weekly patterns.
Why This Matters
By avoiding deep learning, the model runs in seconds on standard hardware and provides clear insights into why a specific demand prediction was made—crucial for urban mobility decision support.
I've open-sourced the full pipeline, including the optimized .xz data handling and EDA companion notebooks.
View the full project on GitHub: https://github.com/SNiPERxDD/GridLock2.0
SNiPERxDD
/
GridLock2.0
Flipkart Gridlock 2.0 hackathon Phase - 1 Solutions
GridLock 2.0 Forecasting Pipeline
GridLock 2.0 is a traffic intelligence hackathon organized by Flipkart in partnership with Bengaluru Traffic Police and hosted on HackerEarth. Phase 1 is an online machine learning challenge with a live leaderboard, where participants submit models against the provided task and improve them over multiple submissions. The official competition page is GridLock 2.0 on HackerEarth.
This repository packages the Phase 1 forecasting pipeline used for the Day 49 demand prediction task, together with a script, companion notebooks, model artifact, and local evaluation files.
Quick start
pip install -r requirements.txt
python gridlock_release_pipeline.py
The final predictor is not a neural network. It combines:
- a hierarchical basis-day routing matrix,
- a ridge regression calibrator,
- and a bounded geohash residual correction.
Repository layout
GridLock 2.0/
├── README.md
├── requirements.txt
├── gridlock_release_pipeline.py
├── notebooks/
│ ├── gridlock_release_pipeline.ipynb
│ └── gridlock_eda_companion.ipynb
├── data/
│ ├── competition_train.csv
│ ├── competition_test.csv
│ ├── evaluation_ground_truth.csv…Tags: #bengaluru #urbanmobility #flipkart #gridlock
Top comments (0)