# A Predictive Pedestrian Crash Model Based on Artificial Intelligence Techniques
## 2 Data and Methods
### Data
#### 2.1.2 Data Manipulation  
Starting from the ISTAT dataset [32], the location of the road accidents was extracted and only the accidents in which at least one pedestrian was involved were considered.  
To fit the Gradient Boosting algorithm, time-consuming data preparation was performed because the ISTAT dataset includes the following different types of information about accident locations:  
* Full address (e.g., street name and number of intersections);
* Incomplete address (e.g., street name without street number);
* Proximity to a point of interest (e.g., in front of a shop/church/school/cinema/supermarket, etc.);
* Proximity to a traffic light or light pole (e.g., distance from a traffic light/light pole #);
* No information about the location.  
Using Google API [33], the addresses of the various accidents were localized to add the corresponding latitude and longitude coordinates to each observation. From the  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Vehicle** & **Pedestrian** & **Numbers of** \\  & & **Accidents** \\ \hline No priority to the pedestrian & Crossed at a pedestrian crossing not & \\ on the appropriate crossings. & protected by traffic lights or traffic warden. & 13,970 \\ Legitimate behavior. & Illicit street crossing. & 12,332 \\ No priority to the pedestrian & Crossing at a pedestrian & 6214 \\ on the appropriate crossings. & crossing respecting the signs. & 3865 \\ Legitimate behavior. & Walked in the middle of the road. & 2974 \\ Legitimate behavior. & Came out from behind & \\  & a parked or stopped vehicle. & 2974 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Top five driver–pedestrian interactions.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Information** & **Most Frequently Occuring Data** \\ \hline driving environment & urban \\ gender of drivers & male \\ age of drivers & 36–55 \\ gender of pedestrian & male \\ age of pedestrian killed & \textgreater{}65 years \\ road section & straightaways/crossings \\ road surface & paved \\ road surface condition & dry \\ traffic condition & peak hours \\ week period & working day \\ \hline \hline \end{tabular}
\end{table}
Table 2: List of most frequently occurring data.  
original dataset, many of the accidents' locations could not be geo-localized due to a poor description made by the officer; therefore, only accidents included in the first three points of the above bullet point were considered.  
For this reason, the count of accidents that occurred in each location may not describe all the accidents that occurred in the location analyzed.  
Among all the addresses available, a sample of 180 locations was selected.  
The 180 road sections were classified by visual inspection using the satellite view and the \"Street View\" tool of Google Maps.  
The information collected concerned the following:  
* Section type (intersection or not);
* Presence of a traffic light (yes or no);
* Presence of a road bump (yes or no);
* Presence of a pedestrian crossing (yes or no);
* Presence of parking lots (yes or no);
* If the road is a one-way road (yes or no);
* Total number of lanes;
* Proximity to a bus stop (yes or no).  
It is worth noting that the dataset shows some issues, which should be considered when inspecting the modelling results, including the following:  
* The count of accidents per road section might not be the total number of accidents that occurred in the location analyzed due to the presence of poor address descriptions in the ISAT database. Consequently, more than 60% of the addresses related to pedestrian accidents could not be accurately localized;
* The characterization of the road stretches was performed in December 2020 and cannot consider any previous configuration. For example, bus stops could have been in different locations in the period of data collection.