A Machine Learning-Based Predictive System for Road Accident Risk Management Using Cloud Architecture
Received: 1 October 2025 | Revised: 10 November 2025, 17 November 2025, and 25 November 2025 | Accepted: 26 November 2025 | Online: 9 February 2026
Corresponding author: Juan Mansilla-Lopez
Abstract
This study aimed to address the issue of the high frequency of traffic accidents in Lima Metropolitana by providing a predictive system built using machine learning techniques. A Random Forest (RF) model was trained with a set of historical data on previous accidents, relevant climatic variables, and infrastructure characteristics. The method used involves basic stages of information capture and preprocessing, exhaustive feature engineering to maximize predictive capacity, and implementation in a cloud-based architecture. The results obtained show that the proposed model achieved an accuracy of 50.92%, a recall of 56.97% and an F1 score of 53.77%, demonstrating high efficiency in the detection of geographical areas with a high risk of accident occurrences. Feature importance analysis revealed that variables such as the district (37.2%), the time of the accident (10.8%), and the month (9.5%) are the most significant factors in the predictions, confirming the importance of spatio-temporal patterns in traffic incidents. This proposed system has a scalable and adaptable design that ensures its applicability in urban environments with similar characteristics. Such technologies can significantly contribute to the reduction of accidents and the improvement in traffic management in the capital of Peru.
Keywords:
cloud architecture, machine learning, random forest, traffic accident predictionDownloads
References
"Informe de adjuntía Nο. 022-2022-DP/AMASPPI," Defensoria del Pueblo - Perú. https://www.defensoria.gob.pe/informes/informe-de-adjuntia-n-022-2022-dp-amasppi/.
H. Yang, X. Zhao, S. Luan, and S. Chai, "A traffic dynamic operation risk assessment method using driving behaviors and traffic flow Data: An empirical analysis," Expert Systems with Applications, vol. 249, Sept. 2024, Art. no. 123619. DOI: https://doi.org/10.1016/j.eswa.2024.123619
Z. Jin, B. Noh, Z. Jin, and B. Noh, "From Prediction to Prevention: Leveraging Deep Learning in Traffic Accident Prediction Systems," Electronics, vol. 12, no. 20, Oct. 2023. DOI: https://doi.org/10.3390/electronics12204335
J. C. Miranda, "Factores que influyen en los accidentes de tránsito ocasionados por el transporte público terrestre en Villa El Salvador, 2021," B.S. Thesis, Universidad Autonoma del Peru, 2023.
Y. Yang, K. Wang, Z. Yuan, and D. Liu, "Predicting Freeway Traffic Crash Severity Using XGBoost-Bayesian Network Model with Consideration of Features Interaction," Journal of Advanced Transportation, vol. 2022, no. 1, 2022, Art. no. 4257865. DOI: https://doi.org/10.1155/2022/4257865
I. C. Obasi and C. Benson, "Evaluating the effectiveness of machine learning techniques in forecasting the severity of traffic accidents," Heliyon, vol. 9, no. 8, Aug. 2023. DOI: https://doi.org/10.1016/j.heliyon.2023.e18812
S. Dong et al., "Predicting and Analyzing Road Traffic Injury Severity Using Boosting-Based Ensemble Learning Models with SHAPley Additive exPlanations," International Journal of Environmental Research and Public Health, vol. 19, no. 5, Mar. 2022. DOI: https://doi.org/10.3390/ijerph19052925
T. Bokaba, W. Doorsamy, B. S. Paul, T. Bokaba, W. Doorsamy, and B. S. Paul, "Comparative Study of Machine Learning Classifiers for Modelling Road Traffic Accidents," Applied Sciences, vol. 12, no. 2, Jan. 2022. DOI: https://doi.org/10.3390/app12020828
B. K. Koo, J. W. Baek, K. Y. Chung, B. K. Koo, J. W. Baek, and K. Y. Chung, "Weight Feedback-Based Harmonic MDG-Ensemble Model for Prediction of Traffic Accident Severity," Applied Sciences, vol. 11, no. 11, May 2021. DOI: https://doi.org/10.3390/app11115072
T. Baykal, F. Ergezer, E. Eriskin, and S. Terzi, "Accident severity prediction in big data using auto-machine learning," Scientia Iranica, vol. 32, no. 7, Mar. 2025.
Z. Cheng, J. Yuan, B. Yu, J. Lu, and Y. Zhao, "Crash Risks Evaluation of Urban Expressways: A Case Study in Shanghai," IEEE Transactions on Intelligent Transportation Systems, vol. 23, no. 9, pp. 15329–15339, Sept. 2022. DOI: https://doi.org/10.1109/TITS.2022.3140345
S. P. Ardakani et al., "Road Car Accident Prediction Using a Machine-Learning-Enabled Data Analysis," Sustainability, vol. 15, no. 7, Mar. 2023. DOI: https://doi.org/10.3390/su15075939
Y. Yang, K. He, Y. Wang, Z. Yuan, Y. Yin, and M. Guo, "Identification of dynamic traffic crash risk for cross-area freeways based on statistical and machine learning methods," Physica A: Statistical Mechanics and its Applications, vol. 595, June 2022, Art. no. 127083. DOI: https://doi.org/10.1016/j.physa.2022.127083
A. Abohassan, K. El-Basyouny, and T. J. Kwon, "Effects of Inclement Weather Events on Road Surface Conditions and Traffic Safety: An Event-Based Empirical Analysis Framework," Transportation Research Record, vol. 2676, no. 10, pp. 51–62, Oct. 2022. DOI: https://doi.org/10.1177/03611981221088588
C. Cao et al., "Dynamic Spatiotemporal Correlation Graph Convolutional Network for Traffic Speed Prediction," Symmetry, vol. 16, no. 3, Mar. 2024. DOI: https://doi.org/10.3390/sym16030308
Y. Lu, Q. Lin, H. Chi, and J. Y. Chen, "Automatic incident detection using edge-cloud collaboration based deep learning scheme for intelligent transportation systems," Applied Intelligence, vol. 53, no. 21, pp. 24864–24875, Apr. 2023. DOI: https://doi.org/10.1007/s10489-023-04673-7
A. Grigorev, A. S. Mihăiţă, K. Saleh, and F. Chen, "Automatic Accident Detection, Segmentation and Duration Prediction Using Machine Learning," IEEE Transactions on Intelligent Transportation Systems, vol. 25, no. 2, pp. 1547–1568, Oct. 2024. DOI: https://doi.org/10.1109/TITS.2023.3323636
D. Santos et al., "Machine Learning Approaches to Traffic Accident Analysis and Hotspot Prediction," Computers, vol. 10, no. 12, Nov. 2021. DOI: https://doi.org/10.3390/computers10120157
A. Grigorev, S. Shafiei, H. Grzybowska, and A. S. Mihăiţă, "Predicting the Duration of Traffic Incidents for Sydney Greater Metropolitan Area using Machine Learning Methods," International Journal of Intelligent Transportation Systems Research, vol. 23, no. 1, pp. 104–125, Apr. 2025. DOI: https://doi.org/10.1007/s13177-024-00437-w
Z. Yuan, K. He, and Y. Yang, "A Roadway Safety Sustainable Approach: Modeling for Real-Time Traffic Crash with Limited Data and Its Reliability Verification," Journal of Advanced Transportation, vol. 2022, no. 1, 2022, Art. no. 1570521. DOI: https://doi.org/10.1155/2022/1570521
"Database of Fatal Traffic Accidents 2008–2023," National Road Safety Observatory (ONSV). https://www.onsv.gob.pe/datosabiertos.
"Inventory of the National Road Network 2022," Ministry of Transport and Communications (MTC). https://portal.mtc.gob.pe/transportes/caminos/vial.html.
"Historical Record of Climate Data for Lima 2000–2014," National Meteorology and Hydrology Service of Peru (SENAMHI). https://www.senamhi.gob.pe/site/descarga-datos/.
A. Portal, M. Sandoval, and P. Castañeda, "Machine Learning-Based System for Predictive Management of Road Accidents in Metropolitan Lima," Nanotechnology Perceptions, vol. 20, no. S15, pp. 3611–3619, 2024.
A. K. Chhotu and S. K. Suman, "Predicting the Severity of Accidents at Highway Railway Level Crossings of the Eastern Zone of Indian Railways using Logistic Regression and Artificial Neural Network Models," Engineering, Technology & Applied Science Research, vol. 14, no. 3, pp. 14028–14032, June 2024. DOI: https://doi.org/10.48084/etasr.7011
Downloads
How to Cite
License
Copyright (c) 2025 Angel Portal, Marlonn Sandoval, Pedro Castaneda, Juan Mansilla-Lopez, Alberto Daniel Garcia-Nunez

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.
