# Predicting Road Crash Severity Using Classifier Models and Crash Hotspots
## 6 Results and Discussion
### Spatial Autocorrelation and Hotspot Analysis  
The spatial distribution patterns of traffic accidents in the Al-Ahsa Region were identified using spatial autocorrelation (Global Moran's I). If the characteristics are spatially clustered, dispersed, or randomly distributed, it is shown by the values of Moran's I [84]. Equation (14) was used to calculate the Global Moran's I, z-score, and \(p\)-value using the spatial autocorrelation  
\[I=\frac{N\sum_{i}\sum_{j}W_{i,j}(X_{i}-\overline{X})\left(X_{j}-\overline{X} \right)}{\left(\sum_{i}\sum_{j}W_{i,j}\right)\sum_{i}\left(X_{i}-\overline{X} \right)\left(X_{j}-\overline{X}\right)^{2}} \tag{14}\]  
where \(X_{i}\) is an attribute value of the target feature at location \(i\), \(N\) is the total number of features, \(W_{ij}\) is the spatial weight between features at locations \(i\) and \(j\), and the neighboring  
Figure 6: Variable importance using random forest classifier. feature at locations \(i\) and \(j\) has an attribute value of \(X_{j}\)[84]. The results of [PERSON]'s I statistic can be verified using z scores, where a confidence level is established. The temperature of cell I is similar to the crash characteristic of the nearby cells if cell I has a significant positive value (i.e., a positive number). I denote a substantial clustering range if it is a large positive value. The cell surface temperature of cell I is significantly different from the surrounding cells if the value of I is negative and significant, on the other hand, which denotes a negative spatial correlation. We can locate hotspots based on the dispersion of these sites. It assesses if the pattern expressed is random, clustered, or scattered using an associated attribute and the offered collection of features. Figure 8 displays the spatial autocorrelation graph using Moran's I statistics of the z-score and \(p\)-value for all traffic accidents between 2016 and 2018 in the Al-Ahsa region. Figure 8 shows that the \(p\)-value was less than 0.001, the z-score for all crashes was 6.169, and Moran's I was 0.067. The positive Moran's I, high z-scores, and tiny \(p\)-values indicate that traffic crashes were spatially clustered, and there is less than a 1% chance that this clustered pattern arose by chance. As a result, this exhibited a statistically significant status, namely, densely clustered. The Getis-Ord \(G_{i}^{*}\) function is widely used in this work to examine hotspots for automobile crashes. A statistic called Getis-Ord \(G_{i}^{*}\) points out high data point density where statistically significant point clusters are located in the neighborhood of a given point. A hotspot can be identified if other features with high values are everywhere around a feature with a high-value density [83; 84]. It is possible that features with a high-value density are not statistically significant hotspots. Equation (15) is used to construct Getis-Ord \(G_{i}^{*}\), and Figure 9 displays a map of the spatial distribution of crash hotspots between 2016 and 2018. The road segments with statistically significant traffic crash hotspots are identified on this map. \[G_{i}^{*}=\frac{\sum_{j=0}^{n}w_{ij}x_{j}-\overline{X}\sum_{j=0}^{n}w_{ij}}{ \sqrt[\frac{\left[n\sum_{j=1}^{n}w_{ij}^{2}-\left(\sum_{j=1}^{n}w_{ij}\right) \right]^{2}}{n-1}} \tag{15}\]  
where \(w_{ij}\) is the spatial weight matrix between objects \(i\) and \(j\), \(x_{j}\) is the attribute value for item \(j\), and \(n\) is the number of features. A hotspot is indicated by a positive z-score, whereas a negative z-score shows a cold area. Z-score values that are more positive indicate a more intensive high-value clustering (i.e., stronger hotspots). Conversely, a lower z-score denotes a greater concentration of low  
Figure 7: Variable importance using XGBoost Classifier. values (i.e., cold spots). Accordingly, points near the center of the city present stronger hotspots, while those away from the center and on small roads show cold spots.