Prediction of urban medical emergencies using machine learning models based on spatial and temporal variables.
Traffic injury prevention · 2025-04-22 · Method & validation
Abstract
OBJECTIVES: This study aims to develop and evaluate a prediction model for medical emergencies in an urban setting, specifically in the Bucaramanga metropolitan area located in Colombia. Accurate forecasting of emergencies could potentially enhance preparedness and optimize resource allocation of the medical emergency services, improving response times, preventing injuries in the population, and reducing mortality and morbidity rates. METHODS: Automatic prediction of emergencies is carried out using a random forest model that uses sliding window techniques and integrates temporal variables to forecast emergency events. Feature vectors incorporate spatial locations (via geocoding), meteorological data, road conditions, demographic information, and road traffic statistics. The prediction task corresponds to the estimation of emergency occurrences by day and location. Two different data sets were constructed to train and evaluate the model: Emergency records from the Regulatory Center for Emergencies and Urgencies (RCEU) and traffic accident reports from Bucaramanga's traffic department for the years 2017 to 2019. RESULTS: The model achieved a mean square error (MSE) of 0.005 and R2 of 0.351 using data from the RCEU. For traffic accident reports from Bucaramanga's traffic department (2017-2019), the MSE was 0.018 and R2 was 0.150. Aggregated daily spatial predictions yielded R2 of 0.75 and MSE of 2.258 (RCEU) and R2 of 0.898 and MSE of 0.798 (traffic department). CONCLUSIONS: The sliding window methodology effectively captures periods with higher emergency occurrences, potentially contributing to potential injury prevention strategies. Although fine-grained prediction accuracy (specific time and location) is limited, the model performs well across an approximately 165 km2 urban area. Though the model's fine-grained accuracy in predicting specific times and locations of emergencies is limited, the automated prediction model demonstrates a promising ability to identify periods with increased emergency occurrences when aggregating spatial information. Further use of fine-grained data and recent machine learning techniques may improve its precision, particularly at smaller spatial and temporal scales.