Preprint v1.1 · Method Specification · Open Access (CC BY 4.0 & MIT)
Predicting bus arrivals when the feed reports positions but not delays: a reproducible three-layer method with an open reference implementation
Yeray Garrido · Independent Researcher & Software Engineer (Bilbao, Spain) · ORCID 0009-0008-0459-0294
Abstract
Many public transport networks publish real-time vehicle positions but not delays, and many timetables give intermediate stop times interpolated at constant speed rather than observed. Bizkaibus, the interurban bus network of Biscay (Spain), has both properties: after the first hour of a trip, 85% of buses pass a stop more than two minutes before the published time. This paper specifies the arrival prediction method of the Bizkaibus+ app in enough detail to reimplement it in any language. The method uses timetable differences instead of absolute times; learns the actual travel time between consecutive stops by time band, as a median shrunk towards the all-day median of the segment; and predicts from three layers with explicit abstention rules: the GPS position projected onto the route, the last stop registered by the feed, and the timetable corrected trip by trip. It recalibrates itself daily, adopting only changes that reduce the error on held-out data. In 9.1 million predictions over 23 days, checked against the actual passage, the arrival shown is within ±2 minutes in 92–96% of cases when the bus is less than three minutes away and in 67% at ten to twenty minutes, against 23–25% for the published timetable. Without any live data, the corrected timetable alone doubles the accuracy of the published one. A reference implementation in Python, test vectors with 407 checks produced by the production engine, a public evaluator that reproduces the production histograms, and the learned tables and evaluation data are openly available.
BibTeX Citation
@misc{garrido_2026_24286302,
author = {Garrido, Yeray},
title = {{Predicting bus arrivals when the feed reports positions but not delays: a reproducible three-layer method with an open reference implementation}},
month = nov,
year = 2026,
publisher = {Zenodo},
version = {1.1},
doi = {10.5281/zenodo.24286302},
url = {https://doi.org/10.5281/zenodo.24286302}
}