# Identify Road Clusters with High-Frequency Crashes Using Spatial Data Mining Approach
## 2 Methodology
### Methods
#### 2.3.3 Cluster and Outlier Analysis (Local Moran's I)  
The First Law of Geography [41], according to Professor [PERSON], is \"everything is related to everything else, but near things are more related than distant things.\" Based on the first law of geography, geographical phenomena or attributes are related to each other in spatial distribution, have spatially related characteristics; that is, the closer the distance is, the more similar the things are [41]. Therefore, there are three types of distributions of crashes: dispersed, random, or clustered.  
The global Moran's I developed by Professor [PERSON] in 1948, is one of the most preferred measure of spatial autocorrelation [42]. The global Moran's I use a single index to detect the degree of autocorrelation of the same variable in the spatial region, and can verify the spatial distribution pattern in entire spatial extent.  
In this study, the local Moran's I (suggested in Professor [PERSON] based on global Moran's I) [19] is used as a local indicator of spatial autocorrelation to find RCHC. The local Moran's I, one of the most widely used local indicators of spatial association statistics [16], is calculated for each road to reveal the degree of spatial autocorrelation and is used to analyze whether the same variable (<crash_count> in this research) has autocorrelation at a specific local location. The local Moran's I index is expressed as [19; 22; 42]  
\[I_{i}=\frac{X_{i}-\overline{X}}{S_{i}{}^{2}}\sum_{j=1,j\
eq i}^{n}W_{ij}(X_{j} -\overline{X}) \tag{2}\]  
Figure 5: Typical topological and geometric relationships of road network.  
where \(I_{i}\) is the calculated local Moran's I index of Road \(i\). \(I_{i}\) is a relative measure and can only be interpreted within the context of its computed \(z\)_-score_ or \(p\)-value. The \(p\)-value is a probability, a type of statistics to express confidence level. The \(z\)_-score_ is a standardized local Moran's I index. \(W_{ij}\) is the weight in SWMR (as discussed in Section 2.3.2) that quantifies the spatial relationship between road \(i\) and road \(j\). \(x_{i}\), \(x_{j}\) is the crash count (as discussed in Section 2.3.1) of road \(i\) and road \(j\). \(\overline{X}\) is the average crash count of all roads. \(n\) is the total number of roads, \(i=1\), \(2\); \(n\) and \(j=1\), \(2\), \(n\). \({S_{i}}^{2}\) is the measure of sample variance, defined as  
\[{S_{i}}^{2}=\frac{\sum\limits_{j=1,j\
eq i}^{n}X_{i}^{2}(X_{j}-\overline{X})^{ 2}}{n-1} \tag{3}\]  
In the cluster and outlier analysis, it is necessary to make assumptions about the spatial distribution of crashes, which is randomization null hypothesis of spatial distribution. The test of randomization null hypothesis of spatial distribution can be performed based on the \(z\)-_score_ and \(p\)-value along with the local Moran's I index. The equation to calculate the \(z\)-_score_ (\(Z_{l_{i}}\)) for \(I_{i}\) is shown as  
\[Z_{l_{i}}=\frac{I_{i}-E[I_{i}]}{\sqrt{V[I_{i}]}} \tag{4}\]  
where \(E[I_{i}]=-\frac{\sum\limits_{j=1,j\
eq i}^{n}W_{ij}}{n-1}\), and \(V[I_{i}]=E[I_{i}^{2}]-E[I_{i}]^{2}\).  
Figure 6: Structure of the spatial weight matrix of roads (SWMR) construction algorithm.  
The _Z\({}_{i}\)-score_ is a standardized local Moran's I value of road \(i\). The _z-scores_ and _p_-values for roads are measures of statistical significance which tell us whether or not to reject the randomization null hypothesis, road by road [1]. In this study, _p_-value \(\leq\) 0.05 (95% confidence level) is used to indicate significant clusters, which is applied to each road. For either road, if its _p_-value is smaller than 0.05 and _z-score_ is greater than 1.96 or less than \(-\)1.96, that road will be considered as one of the cluster or outlier. The road who _z-score_ is positive and greater than 1.96 and _p_-value is smaller than 0.05, with the neighboring roads have similar _z-score_ and _p_-value, form the high-high road clusters. The high-high road clusters are the RCHC, which can be used to directly identify the dangerous roads.