Delay Prediction Under Uncertainty

  • Machine Learning
  • Gradient Boosting
  • Calibration
  • PySpark
  • EPFL
  • COM-490
  • My contribution: Delay Prediction Pipeline
  • code

The problem

Point prediction

A delay prediction model gives us a single estimate of how late a vehicle will arrive.

  • It gives us the expected delay
  • But it does not tell us how uncertain that estimate is

What a traveler needs

For a traveler, on top of the expected delay, one important question is:

  • What is the distribution of possible delays? P(delay ≤ X) for a given delay tolerance.

Data

The model uses historical operations together with information available before each trip.

  • Historical public transport operations around Lausanne, July 2024 to January 2026.
  • Historical arrival delays, computed as the difference between actual and scheduled arrival times
  • Timetable, line, stop, and trip information
  • Forecast weather from Open-Meteo · code
  • Calendar information and special days, such as holidays and local events

Prediction pipeline

I first predict the delay, then use past prediction errors to quantify the uncertainty around it.

01Train the model

Train data

Train GBT

Point prediction model

02Learn the errors

Calibration data + model

Actual − Predicted

Residual distribution

03Build the distribution

Point prediction + residual quantiles

Calibrated delay quantiles

Predicted delay distribution

Technical details on calibration and quantile construction are available here .

Validation

I checked whether the predicted quantiles matched their intended coverage on unseen test data.

  • q90 (90th quantile) should contain about 90% of actual delays; the plot compares target and observed coverage.
0.00.2 0.40.6 0.81.0 0.00.2 0.40.6 0.81.0 Target coverage Observed coverage Calibrated quantiles Perfect calibration

Mean absolute coverage gap: 2.40 pp vs. ~6.00 pp baseline across all 11 quantiles, with slightly conservative estimates overall.

Integration with routing

My delay model provides the transfer probability; our final route planner uses it to evaluate and rank routes.

Historical transport data + Timetable + Weather + Calendar Delay prediction + calibration Delay lookup: P(delay ≤ X) Route Planner Algorithm Ranked routes

X = next departure − scheduled arrival − walking time − transfer buffer