HUBS  1,657CORRIDORS  2,783MODEL  LIGHTGBMHOLDOUT  FUTURE WEEK
LEVEL P-03NO LEAKAGE
◂ ALL PROJECTS
CASE FILE P-03 ── SUPPLY CHAIN · GRAPH ML

ETA
GRAPH

GRAPH-BASED DELHIVERY ETA OPTIMIZATION

The routing engine (OSRM) underestimates leg time by about 2x: only ~5% of its ETAs land within 15% of actual.

Treat the network as a graph, not a list of routes. Delay propagates through hubs, so each hub's structural role becomes a feature.

NO LEAKAGE
The graph used for model features is built from training legs only, and the model is scored on a future week it never saw (Sep 27 – Oct 3, 2018).
SCREEN ── NETWORK MAPLIVE
GRAPH-BASED DELHIVERY ETA OPTIMIZATION screenshot
▸ PRESS START
SCORESCOREBOARD
MAE (MIN)
107→32
Graph-enhanced model vs the OSRM routing engine.
WITHIN 15%
46%
Of legs, up from ~5% with OSRM.
GRAPH LIFT
−24%
MAE cut from graph features alone.
LATE TIME
−4%
Network-wide, by fixing the top 3 bottleneck hubs.
PATHPIPELINE
OSRMSHORTEST PATH▸CLEAN ROADS▸~2x TOO OPTIMISTIC
GRAPH ETA144,867 SCANS▶OD LEGS▶CORRIDORS▶GRAPH▶FEATURES▶LIGHTGBM

Betweenness, degree, clustering and node2vec embeddings per facility feed the ETA model. It is trained twice, with and without graph features, to isolate the lift from network structure.

BOSSHOW IT HOLDS UP
CORE AHUB RISK SCORE

Each hub scores 0–100: 70% realised SLA breach plus 30% betweenness centrality, so central hubs are flagged even before they show up in breach volume.

BREACH WEIGHT70%
CENTRALITY30%
TOP 3 SHARE~7% OF BREACH
FIX ASSUMED60% DELAY CUT
A tunable heuristic, not a fitted parameter.
CORE BTOP BOTTLENECKS

Bhiwandi has the highest realised late time, Gurgaon the highest betweenness so its delays ripple network-wide, and Kolkata Dankuni is a chronic eastern chokepoint.

#1BHIWANDI (MH)
#2GURGAON (HR)
#3KOLKATA (WB)
FIXCAPACITY + DWELL
Reasoning and assumptions are in the repo's strategy memo.
FIG 1 ── LEGS WITHIN 15% OF ACTUALHIGHER IS BETTER
OSRM
5%
BASELINE
35%
GRAPH
46%
Time-based holdout · baseline = same model without graph features
FIG 2 ── MEAN ABSOLUTE ERRORLOWER IS BETTER
OSRM
107 MIN
BASELINE
42 MIN
GRAPH
32 MIN
Minutes per leg on the held-out week
VERDICT
About 46% of legs within 15% of actual: roughly 10x the routing engine.
The notebook's best model uses node2vec. The live dashboard drops it for fast, cache-friendly predictions, so its headline is a little lower (~42%).
NEXT LEVEL
▸ Temporal graphs: hub congestion by hour and weekday.
▸ Graph neural networks (GraphSAGE / GAT) instead of hand-made features.
▸ Prediction intervals with quantile LightGBM.
▸ Live re-scoring of hub risk as new scans arrive.
SELECTDASHBOARD TABS
MAP
P-03 · 01
NETWORK MAP

Corridor graph; node size and colour show delay-risk score.

HUB
P-03 · 02
HUB RISK

Rank facilities by risk and drill into any hub's corridors.

LANE
P-03 · 03
CORRIDOR RISK

Find the corridors contributing the most SLA breach.

ETA
P-03 · 04
ETA PREDICTOR

Pick source and destination, compare the prediction with OSRM.

ML
P-03 · 05
MODEL

Baseline vs graph-enhanced model on held-out data.

RULES OF PLAY
▸ Time-based holdout: no trip appears in both splits.
▸ Graph features come from training legs only.
▸ Cold-start hubs get zero graph features.
▸ Impact figures use explicit, adjustable assumptions.
ARTEFACTS
DATA ▸ Delhivery dataset (Kaggle, CC0) · Sep–Oct 2018
SCALE ▸ 144,867 scans · 14,817 trips
STACK ▸ NetworkX · node2vec · LightGBM · Plotly · Streamlit
[ ▸ LIVE DEMO ]
[ ▸ SOURCE CODE ]
[ ▸ STRATEGY MEMO ]
◂ P-02 KHATAAI CONTINUE? ▸ ALL PROJECTS P-04 CUSTVALUE ▸
LOKESH KUMAR
IIT Roorkee engineer building AI agents, LLM evals and data systems that change real decisions.
CONTACT
MAIL ▸ lokeshkumar22119032@gmail.com
GHUB ▸ github.com/lokifergusion9
LNKD ▸ in/lokesh-kumar-1768262b9
INDEX
░▒▓ END OF FILE ▓▒░LOKESH KUMAR · MMXXVI