Precise and reliable forecasting of dwell time at each bus stop benefits both passengers and operators, particularly in the urban and rural areas of developing countries such as Sri Lanka, where buses are the dominant mode of public transport and traffic is heterogeneous with little lane discipline. Existing bus dwell time (BDT) models are trained on historical data, yet traffic conditions, passenger behaviour, weather, road management and sudden events change in unpredictable sudden, gradual or transitional ways. This phenomenon, known as concept drift, steadily degrades the accuracy of deployed predictive models.
This project proposes a robust strategy for handling real concept drift in BDT prediction. An XGBoost-based dwell time model is updated through incremental learning under an active strategy, in which the Drift Detection Method (DDM) monitors batches of incoming data and triggers model updates only when drift is detected. To overcome data losses, insufficient data and uncertain triggering in streaming GPS data, a novel Hybrid Batch Processing (HBP) technique forms batches using both a minimum time interval and a minimum data count. The approach is evaluated on raw GPS data from the heterogeneous Kandy–Digana bus route (route 654), and is released as the open-source iBAT framework together with the gps2gtfs preprocessing package.
Experiments used 14,128 trips over 14 bus stops on route 654 (Kandy–Digana), collected from October 2021 to February 2022 and July to October 2022, with a pronounced drift appearing after the 2022 fuel crisis and curfew in Sri Lanka. Incorporating concept drift handling alone reduced the base model's MAE from 26.17 s to 22.08 s (a 15.63% improvement). The proposed active strategy with DDM, incremental learning and hybrid batch processing achieved an MAE of 21.63 s and RMSE of 37.59 s with a mean average processing time (MAPT) of 59.25 ms. This corresponds to a 17.35% improvement in MAE and 3.48% in RMSE over the XGBoost base model without drift handling, and outperforms the baseline concept drift handling strategy by 2.04% in MAE, 1.22% in RMSE and 55.28% in MAPT.
Hybrid Batch Processing with Active Drift Handling
A batch formation technique that combines time-based and count-based triggers, paired with DDM drift detection and incremental XGBoost updates, yielding accurate predictions with less frequent model updates.
iBAT Framework
An open-source Python framework for real-time bus dwell time prediction that integrates incremental learning algorithms with configurable batch processing and concept drift handling strategies, shipped with route 654 datasets.
gps2gtfs Package
A Python package published on PyPI that preprocesses raw public transit GPS data and converts it into GTFS format, extracting trips, stops, arrival and departure times, dwell times and running times.
The work shows that a model can remain robust and accurate in the presence of real concept drift while adapting to dynamic traffic conditions, which is especially valuable for public transit in developing countries with heterogeneous traffic. Its active strategy reduces memory and computation by updating only when drift occurs, supporting deployment on edge devices. A paper describing the findings was submitted to the 27th IEEE International Conference on Intelligent Transportation Systems, and future work targets automatic hyperparameter determination that adapts to ever-changing traffic conditions.
Team Aspires with Prof. Uthayasanker Thayasivam at CSE Careers Day, University of Moratuwa
Project poster: Handling Concept Drift in Bus Arrival Time Prediction