Machine Learning to predict the severity of road accidents.
Latam online. Second Edition. 2021 Traffic accidents are one of the most important causes of fatality and severity in different places in the world, because of this it is essential to have a way to...
A learning project shared by the community. The article documents its team, methods and results; it does not establish that the prototype is ready for real-world use.

This archive includes automatic translations. Audio, video and text inside images remain in their original language.

Latam online. Second Edition. 2021
Traffic accidents are one of the most important causes of fatality and severity in different parts of the world. Because of this, it is essential to have a way to reduce them as much as possible in order to avoid tragedies and loss of human life within a certain territory.
The World Health Organization (WHO) indicates that every year more than 1.35 million people die around the world due to traffic accidents, that is, one death every 25 seconds, which makes them the most frequent cause of death among people aged 15 to 29 and the ninth most common in the general population. Low- and middle-income countries have the greatest burden and highest death rates from traffic accidents.

Traffic accidents in Ecuador have a fairly common occurrence, only in the city of Guayaquil between 2018 and 2021, 17,671 accidents with at least one death and 17,681 accidents with at least one seriously injured person were recorded according to official sources from the Traffic and Mobility Agency (ATM); institution in charge of road safety in said city.



Problem description
Based on what was mentioned above, the following problem arises:
Can a web system be created that optimizes the resources of the traffic agency and prevents serious and/or fatal accidents in the city of Guayaquil?
General objective
The general objective is to implement a Machine Learning model for the early estimation of serious or fatal traffic accidents by analysing previous data related to traffic accidents in the city of Guayaquil.
The following graphic shows the central idea of the project.

Information collection
The main source of information is the structured ATM dataset that includes certain conditions that arise during an accident. After an exhaustive analysis of the different variables obtained, some of them were discarded because they did not have a significant dependence on the accidents. This selection was based on scientific articles related to the topic.
For ATM privacy reasons we cannot show images of the dataset used, however we will provide information about the variables used:

Model selection
The selection of models is based on the following two considerations:
- Ease of implementation.
- Model performance.
The models to be developed are:
- SVM (Support Vector Machine)
- Random Forest
- Regular Gradient Boosting



Techniques implemented
The main techniques used to work with the Dataset were the coding of categorical variables through One-Hot-Encoding and the standardization of continuous variables.


Model evaluation
SVM (Support Vector Machine)

Random Forest

Regular Gradient Boosting


Analysis of results
Below are the results and accuracy of the SVM, Random Forest and Regular Gradient Boosting models.
SVM


Random Forest


Regular Gradient Boosting

Final details

Conclusions
The system will be shown as a perfect alternative for the detection of serious and/or fatal accidents, since it allows them to be viewed every hour on an interactive map embedded in a web interface.
Furthermore, the models used are among the best to be able to perform multiclass classifications, which was the crux of the problem from the beginning.
Future plans
This project is intended to be carried out by the following agencies and institutions:
- Transit and Mobility Agency (ATM)

- Ecuadorian Transit Commission (CTE)

- Agencies and institutions destined to control the traffic of the GAD and municipalities that are in category A.
Members
Ing. Miguel Angel Murillo Arteaga (miguelangelmurilloarteaga@gmail.com)
Eng. Christopher Vaccaro (chris_94_vacced@hotmail.com)
Eng. Stefany Uguña (solange95salazar@gmail.com)
Grace Reyes (grace.reyes22@gmail.com)
Wladimir Robles (W.Robles.Asociados@gmail.com)
Project presentation: Demoday
Repository
https://github.com/SaturdaysAI/Projects/tree/master/LATAM_remote/viasegura

More artificial intelligence!
The mission of Saturdays.ai is to make artificial intelligence more accessible (#ai4all) through intensive courses and programs where projects for good are carried out (#ai4good).
If you want to learn more about artificial intelligence, join our community at community.saturdays.ai or visit us on our website www.saturdays.ai Join us!
A history of the Saturdays.AI community. Originally published on March 9, 2022.
← More community stories


