# Ensemble Clustering in GPS Velocities: A Case Study of Turkey
## 2 Data and Methodology
### Generation Mechanisms
#### 2.3.1 Birch Clustering  
BIRCH is a clustering algorithm that can cluster noisy and multidimensional data in particular massive data sets with a single scan [33]. It greatly reduces the temporal costs unlike \(k\)-means and dynamically and incrementally clusters acquired data instances. For a given data set \(i=1,2,\ldots,n\) with N-dimensional data points in a cluster \(\overrightarrow{X_{l}}\):  
\[\overrightarrow{X0}=\frac{\sum_{l=1}^{N}\overrightarrow{X_{l}}}{N} \tag{4}\]  
\[R=(\frac{\sum_{l=1}^{N}(\overrightarrow{X_{l}}-\overrightarrow{X0})}{N})^{1/2} \tag{5}\]  
\[D=(\frac{\sum_{t=1}^{N}\sum_{j=1}^{N}(\overrightarrow{X_{l}}-\overrightarrow{ X_{j}})^{2}}{N(N-1)})^{1/2} \tag{6}\]  
where \(\overrightarrow{X0}\) indicates centroid of each cluster. \(R\) refers to the average distance of member points from the centroid. \(D\) represents the diameter of the cluster. \(R\) and \(D\) are two alternative measures of the tightness of the cluster around the centroid [34]. After that, five alternative distances are defined to measure their proximity between two clusters. Given the centroids of two clusters \(\overrightarrow{X0_{1}}\) and \(\overrightarrow{X0_{2}}\), the Euclidean distance \(DO\), Manhattan distance \(D1\), the average inter-cluster distance \(D2\), average intra-cluster distance \(D3\) and variance increase distance \(D4\) of the two clusters are calculated as follows:  
\[D0=\left((\overrightarrow{X0_{1}}-\overrightarrow{X0_{2}})^{2}\right)^{1/2} \tag{7}\]  
\[D1=\left|\overrightarrow{X0_{1}}-\overrightarrow{X0_{2}}\right|=\sum_{t=1}^{d }\left|\overrightarrow{X0_{1}}^{\gamma}(t)-\overrightarrow{X0_{2}}^{\gamma}(t )\right| \tag{8}\]  
\[D2=(\frac{\sum_{t=1}^{N_{1}}\sum_{j=N_{1}+1}^{N_{1}+N_{2}}(\overrightarrow{X_ {t}}-\overrightarrow{X_{j}})^{2}}{N_{1}N_{2}})^{1/2} \tag{9}\]  
\[D3=(\frac{\sum_{t=1}^{N_{1}+N_{2}}\sum_{j=1}^{N_{1}+N_{2}}(\overrightarrow{X_ {t}}-\overrightarrow{X_{j}})^{2}}{(N_{1}+N_{2})(N_{1}+N_{2}-1)})^{1/2} \tag{10}\]\[D4=\sum_{k=1}^{N1+N2}(\overrightarrow{X}_{k}^{\gamma}-\frac{\sum_{i=1}^{N_{1}+N_{2 }}\overrightarrow{X}_{l}}{\sum_{1+N_{2}}})^{2}-\sum_{i=1}^{N_{1}}( \overrightarrow{X}_{i}^{\gamma}-\frac{\sum_{i=1}^{N_{1}}\overrightarrow{X}_{l}} {N_{1}})^{2}-\sum_{j=N_{1}+1}^{N1+N2}(\overrightarrow{X}_{j}^{\gamma}-\frac{ \sum_{i=N_{1}+1}^{N_{1}+N_{2}}\overrightarrow{X}_{l}}{N_{2}})^{2} \tag{11}\]  
The BIRCH method is based on two important concepts: the Clustering Feature (CF) and the CF tree. The CF is a structure consisting of three parameters that will represent in the main memory the subsets formed from small groups of data objects. The clustering vector of the cluster \(\overrightarrow{X0_{1}}\) is expressed as \(CF=(N,\overrightarrow{LS},SS)\), where \(N\) is the number of data, \(\overrightarrow{LS}\) is the linear sum of the \(N\) data, i.e., \(\sum_{i=1}^{N}\overrightarrow{X}_{l}\), and \(SS\) is the square sum of the \(N\) data, i.e., \(\sum_{i=1}^{N}(\overrightarrow{X}_{l})^{2}\).  
The \(CF\) tree created using the \(CF\) values determined for the clusters has a structure representing a branching factor \(B\) and a threshold value \(T\). The \(CF\) tree represents each node as a subset and each entry in the \(CF\) tree gives an input value to the sub-nodes which is the sum of this tree. The threshold value \(T\) sets the limit of the maximum input value at each node. The first step in the creation of the CF tree is to iteratively determine the appropriate leaf structure according to a chosen distance metric: \(DO,D1,D2,D3\), and \(D4\). If the current input values in the data set are greater than the threshold value as a result of the distance calculation process, a new sub-cluster is created [33].