# Explainable Machine-Learning Predictions for Peak Ground Acceleration
## 3 Establishment of the Machine Learning Model
### Feature Selection
The site profiles used in this paper are more than 30 m, which can be calculated directly;  
(11) Average shear wave velocity within 30 m below the site surface (\(V_{\text{s30}}\)/(m/s)). The commonly used feature selection methods include the filter method, the embedded method, and the wrapper method. The filter method is usually used as a preprocessing step. It is completely independent of any machine learning algorithm and it selects features based on scores in various statistical tests and various indicators of correlation. The embedded method is a method that allows the algorithm to decide which features are used; that is, feature selection and algorithm training are carried out at the same time. When using the embedded method, we first use some machine learning algorithms for training to obtain the weight coefficients of each feature and then select features from large to small according to the weight coefficients. The wrapper method is very similar to the embedded method; it also relies on the choice of the algorithm itself to complete feature selection. However, the difference with the embedded method is that we often use an objective function as a black box to help us select features, rather than input a threshold of an evaluation index or statistic. The most typical objective function is recursive feature elimination (RFE). In this study, we used XGBoost, random forest, and decision tree to establish machine learning models, and their basic learner CART is not sensitive to feature scaling, so we did not normalize or standardize the input parameters. We used 14 different feature selection methods to rank the importance of the 11 extracted influencing factors. The methods include filter methods (F-test and mutual information method), embedded methods (algorithm model adopts decision tree, extra tree, adaptive boosting, random forest, gradient boosting, and extreme gradient boosting), and RFE methods (algorithm model adopts decision tree, extra tree, adaptive boosting, random forest, and extreme gradient boosting, and linear support vector machine feature weight ranking). According to the order of feature importance from high to low, we assigned a score of 11 to the most important feature in each method and a score of 1 to the least important feature. If two features, set as feature A and feature B, had the same importance ranking, then they were assigned the same numerical value as the two features, e.g., both are 11, and then a value of 9 is assigned to the feature C after A and B. Combining the results of each method, the importance score of each feature is shown in Figure 2. The numbers above the bar chart in Figure 2 are the sum of the assignment of the same feature by 14 feature importance ranking methods. The larger the number, the higher the importance of the feature. According to the feature importance scores from high to low, we started with the two most important features, and added features to the combination in turn until it included all features. Finally, the following 10 feature combinations were used as model inputs. (1) PBA and Bedrock \(V_{\text{s}}\);  
(2) PBA, Bedrock \(V_{\text{s}}\), and FP;  
(3) PBA, Bedrock \(V_{\text{s}}\), FP, and D800;  
(4) PBA, Bedrock \(V_{\text{s}}\), FP, D800, and OBT;  
(5) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, and \(V_{\text{s20}}\);  
(6) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, \(V_{\text{s20}}\), and \(V_{\text{se}}\);  
(7) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, \(V_{\text{s20}}\), \(V_{\text{se}}\), and Depth;  
(8) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, \(V_{\text{s20}}\), \(V_{\text{se}}\), Depth, and \(V_{\text{s30}}\);  
(9) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, \(V_{\text{s20}}\), \(V_{\text{se}}\), Depth, \(V_{\text{s30}}\), and Surface \(V_{\text{s}}\);  
(10) PBA, Bedrock \(V_{\text{s}}\), FP, D800, OBT, \(V_{\text{s20}}\), \(V_{\text{se}}\), Depth, \(V_{\text{s30}}\), Surface \(V_{\text{s}}\), and SFP.