# Three-Dimensional Modeling of the Xichang Crust in Sichuan, China by Machine Learning
## 4 Morphology of Active Fault
### The Geometric Features of Fault Plane  
We can use a high-quality earthquake catalogue to constrain the deep structure of the fault and extract more fine morphology of the fault plane. However, the fault distribution in the Xichang area is complex, and the earthquake clusters are unevenly distributed, so it is difficult to distinguish the relationship between earthquakes and faults. Therefore, based on the previous dataset, this study established the initial model of the fault plane, used the supervised classification algorithm in machine learning to classify the earthquakes according to faults, used the machine learning unsupervised clustering technique to extract the earthquakes closely related to the fault plane, then the fault plane of the core cluster was formed. The source location was fitted by spline function to obtain the three-dimensional shape of earthquake clusters corresponding to faults and extract the morphology of fault planes. The key procedures are as follows:  
(1) There is no clear correspondence between earthquake and fault. How to link earthquakes with faults has always been a key problem. The common method is buffered analysis, that is, the closer the earthquake is to the fault, the greater the possibility that the earthquake belongs to the fault. It is based on the determined fault plane. It is difficult to determine the boundary range of the distance quantitatively. However, the earthquake subordination is more complex in the adjacent or intersecting deep faults, which needs to be classified by machine learning correlation algorithm. We try to use the fault line and fault occurrence information to produce the initial fault plane model, take the fault plane node data as the training dataset, use the supervised classification of K nearest neighbor (KNN) algorithm training model, and use the seismic data as the test set to predict the faults to which the earthquake may belong, so as to classify the existing earthquakes, the classification results are shown in Figure 4a. (2) Due to the uncertainty of earthquake location and background noise effects, the earthquakes are not strictly distributed according to the fault direction. There are often some background earthquakes between faults, which may affect the fitting accuracy of the fault plane. The spectral clustering algorithm has obvious advantages in screening seismic clusters related to the fault plane [31]. It is based on the spectral graph theory, which has the advantages of clustering in the arbitrary shape of sample space and converging to the \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Longitude** & **Latitude** & **Depth** & **Mg** & \multicolumn{3}{c}{**Plane 1**} & \multicolumn{3}{c}{**Plane 2**} & \multirow{3}{*}{**Fault**} \\ \cline{4-9} (\({}^{\circ}\)) & (\({}^{\circ}\)) & (km) & & **s1** & **d1** & **r1** & **s2** & **d2** & **r2** & \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 3: Focal mechanism solutions. optimal global solution compared with the traditional clustering algorithm. The closer an earthquake is to a fault line, the greater the probability related to the fault and the greater the degree of membership. The definition of distance or similarity measure usually controls the shape of the clusters. Therefore, it is necessary to calculate the distance between the earthquake and the extension direction of the fault line, the distribution direction of the fault plane, and the direction of the focal mechanism nodal plane, respectively, and establish a quantitative similarity matrix based on this. Then, the spectral clustering algorithm selected the earthquakes related to faults. In the process of spectral clustering, the number of seismic clusters and the number of iterations need to be set. After repeated experiments, the final parameters were selected as \(n\_cluster=5\), \(n=100\) times. The earthquake clusters close to the fault were selected in the clustering results so that the background noise earthquakes could be better eliminated. See Figure 4b for the clustering results.