# Displacement Patterns and Predictive Modeling of Slopes in the Bayan Obo Open-Pit Iron Mine
## 2 Data and Methodology
### Methodology  
#### 2.3.1 Identification of Early Warning Units Based on the Clustering Algorithm  
DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based spatial clustering algorithm. Its core idea is to identify clusters with similar characteristics based on the spatial density of data points while effectively distinguishing noise points. The algorithm defines two key parameters--the neighborhood radius \(\varepsilon\) (Eps) andthe minimum number of points in the neighborhood (MinPts)--to describe the density level of data distribution. Given a dataset D, for any data point p, its \(\varepsilon\)-neighborhood is defined as follows (Equation (4)):  
\[\mathrm{N}\varepsilon(\mathrm{p})=\{\mathrm{q}\in\mathrm{D}\mid\mathrm{dist}( \mathrm{p},\mathrm{q})\leq\varepsilon\} \tag{4}\]  
where dist(p,q) is the distance between points p and q, typically measured by Euclidean distance (Equation (5)):  
\[\mathrm{dist}(\mathrm{p},\mathrm{q})=\sqrt{\sum_{i=1}^{n}(\mathrm{p}_{i}- \mathrm{q}_{i})^{2}} \tag{5}\]  
Based on the number of points within the \(\varepsilon\)-neighborhood, DBSCAN classifies data points into three categories:  
Core Point: If the \(\varepsilon\)-neighborhood of a point p contains at least MinPts points, as described in Equation (6)  
\[|\mathrm{N}\varepsilon(\mathrm{p})|\geq\mathrm{MinPts} \tag{6}\]  
then p is a core point. Border Point: A border point is a point that is not itself a core point but lies within the \(\varepsilon\)-neighborhood of a core point. Noise Point: A point that is neither a core point nor a border point is considered a noise point. The DBSCAN clustering process is based on the connectivity of core points. Specifically, if two core points have overlapping \(\varepsilon\)-neighborhoods, they belong to the same cluster. The algorithm recursively merges all core points and their neighborhood points to form a complete cluster. Border points belong to a core point's cluster but do not contribute to further expansion. Noise points are not included in any cluster. In implementation, DBSCAN randomly selects an unvisited point as a starting point and checks if it is a core point. If so, it begins expanding from that point to form a new cluster. The expansion involves adding all core points in the \(\varepsilon\)-neighborhood and their neighbors to the cluster, continuing until no more points can be added. Then, a new core point is selected from the remaining unvisited points, and the process is repeated until all points are labeled as part of a cluster or as noise. DBSCAN is advantageous in identifying clusters of arbitrary shapes and does not require prior specification of the number of clusters. Compared with algorithms like K-means, DBSCAN is more suitable for complex data distributions. However, it also has limitations, such as sensitivity to the choice of \(\varepsilon\) and MinPts, and the risk of the \"curse of dimensionality\" when dealing with high-dimensional data. To address this, dimensionality reduction and parameter optimization were performed during data preprocessing. In this study, Principal Component Analysis (PCA) was employed for dimensionality reduction. PCA is an unsupervised dimensionality reduction technique used for data compression, denoising, feature extraction, and visualization. PCA identifies the directions (principal components) that account for the most variance in the data and uses those as new feature axes. The dimensionality reduction procedure involves combining the standardized displacement data and the normalized spatial coordinates into a mixed feature matrix as the input for PCA. The Scikit-learn PCA module uses Singular Value Decomposition (SVD) instead of the traditional covariance matrix, directly decomposing the standardized data into a left singular matrix, singular values, and a right singular matrix. The column vectors of the right singular matrix represent the principal directions, avoiding numerical instability from explicitly computing the covariance matrix.