Development of a bus arrival time (to bus halt) prediction model using machine learning

Loading...
Thumbnail Image

Date

2025

Journal Title

Journal ISSN

Volume Title

Publisher

Abstract

Accurate, real-time bus arrival information is essential for enhancing public transportation efficiency. Although real-time vehicle location data provides valuable information on current bus positions, it alone cannot forecast future arrival times. Prediction models are therefore essential for estimating travel times to upcoming stops by capturing the dynamic relationships among traffic flow, passenger demand, and operational conditions. In Sri Lanka's public transport network, bus arrival times are currently estimated using Google Maps and Google Transit. However, these systems rely solely on static transit data for their predictions, limiting their accuracy in accounting for real-time external conditions. As a result, they do not incorporate dynamic factors that could significantly impact bus travel time predictions. Hence, there is a need to identify unique factors affecting bus arrival times within the Sri Lankan Road system and to develop an accurate travel time prediction model that accounts for these factors. This study focuses on the development of an accurate real- time bus arrival time prediction model using Global Positioning System (GPS) data and machine learning techniques. GPS data from the Moratuwa to Colombo bus route (100) was collected for the study over 30 days, covering weekdays, weekends, and public holidays, using five GPS units at various times of the day. This included data from 335 bus trips, resulting in GPS data points with an accuracy up to 1 sec. The route consists of 53 bus stops and data filtering was performed based on GPS locations relative to each bus stop to calculate travel times between each stop separately. To improve accuracy, the total route was segmented by considering the number of bus stops, allowing for more precise travel time predictions by identifying speed changes in each section. Through a review of the literature, key factors affecting bus travel time were identified, including road section, time of day, day of the week, peak/off-peak hours, availability of bus lanes, distance travelled, traffic flow, weather conditions, number of signalized intersections, and number of signalized crossings. Data collection was conducted to encompass all these factors. After data collection, the most accurate travel time prediction model was identified by evaluating various types of models previously used in research. The available machine learning models, the Support Vector Regression Model 9, Adaboost Model, K-Nearest Neighbors (KNN) Model, Random Forest Model, XG Boost Model, Gradient Boosting Regression Model, and Long Short-Term Memory (LSTM) Model were selected to be trained with the available dataset. Mean Absolute Error (MAE), Mean Square Error (MSE), Mean Absolute Percentage Error (MAPE), Root Mean Squared Error (RMSE), and R-squared value were selected as model evaluation parameters. Out of the tested models, SVR, RFR, KNN, AdaBoost, XGBoost and GBR performed similarly to each other, showing minute changes with MAE values varying between 17 seconds to 18 seconds and r2 values greater than 0.6. It was clear that the LSTM model performed prominently better than the other models due to the time series nature of the data set providing the lowest MAE of 3.8 seconds and the highest r2 value of 0.98. The proposed model aims to generate accurate bus arrival time predictions for each bus stop when the trip's starting time from the origin is known. The model can be further improved in the future by incorporating real-time traffic data and real-time accident data to enhance prediction accuracy, providing accurate bus arrival times for passengers across the public transport network.

Description

Citation

Medawatte, M.P.V.P. (2023). Development of a bus arrival time (to bus halt) prediction model using machine learning [Master's theses, University of Moratuwa]. Institutional Repository University of Moratuwa. https://dl.lib.uom.lk/handle/123/25529

DOI

Endorsement

Review

Supplemented By

Referenced By