# Explainable Machine-Learning Predictions for Peak Ground Acceleration
## 3 Establishment of the Machine Learning Model
### Model Training  
According to the author's previous research results [47], [PERSON] used six different machine learning models to predict PGA, including both simple models, such as linear regression and decision tree, and complex aggregation algorithm models, such as random forest, Adaptive Boosting (AdaBoost), and XGBoost. Compared with random forest, AdaBoost, and other models, XGBoost has the best prediction performance. [PERSON] et al. [48] introduced the results of 8 different machine learning algorithms in the prediction of axial compressive capacity of CFRP-confined, concrete-filled steel tubular short columns, including linear regression (LR), k-nearest neighbor (KNN), support vector machine (SVM), and typical ensemble learning models such as RF, AdaBoost, gradient boosting decision tree (GBDT), XGBoost, and LightGBM regressor (LGB). The XGBoost algorithm proved to provide the best accuracy among these methods. [PERSON] et al. [49] explored the application of LR, KNN, SVM, RF, and XGBoost models in predicting the PGA and PGV (peak ground velocity) during an earthquake. The best predictions were obtained using the RF and XGBoost models for the prediction of PGA and PGV, respectively. [PERSON] [50] considered 8 different machine learning methods to obtain the best prediction model for the punching shear strength of flat slabs, including LR, ridge regression, SVM, DT, KNN, RF, AdaBoost, and XGBoost. XGBoost shows the best performance. For this reason, we used the XGBoost model to predict PGA in this paper. In order to comprehensively evaluate the prediction results of the machine learning models, we choose two other machine learning algorithms based on a tree structure for PGA prediction, one is RF and the other is DT. The dataset and input parameters used are the same as the XGBoost model. In this study, two hyper-parameters are considered to improve the performance of the DT model: max_depth and max_features. They have the same meaning as the two parameters in the RF model. We also used 10-fold cross-validation and grid search to obtain the optimal hyper-parameters of the DT model, and the results of the hyper-parameters are shown in Figure 6. The optimal DT hyper-parameters' values are: max_depth: 7; max_features: 3. Figure 5: Correlation matrix for input four features. For the RF model, three hyper-parameters are considered: the n_estimators parameter, which is used to specify the number of decision trees in the RF; the max_depth parameter, which indicates the maximum depth of the decision tree; and the max_features parameter, which is the maximum number of features considered when constructing the optimal model of the decision tree. We also used 10-fold cross-validation to obtain the optimal hyper-parameters of the RF model. The optimization results of the hyper-parameters are shown in Figure 7, and the optimal RF hyper-parameters' values are: n_estimators: 67; max_depth: 7; max_features: 3. The hyper-parameters of the XGBoost regression model are as follows: the subsample parameter, used to specify the proportion of sampling from the sample; the learning_rate parameter, used to reduce the step length of each step; the n_estimators parameter, used to specify the number of weak learners in the model; the max_depth parameter, used to specify the maximum tree depth of the weak learner; the reg_alpha parameter, used for the objective function to use L1 regularization and control the regularization strength; and the reg_lambda parameter, used for the objective function to use L2 regularization and control regularization strength. We used 10-fold cross-validation to obtain the optimal hyper-parameters of the XGBoost model, and the maximized average \(R^{2}\) values of the validation dataset were taken as the optimal hyper-parameters. The optimization results of the hyperparameters are shown in Figure 8. The optimal XGBoost h  
Figure 6: Determination of hyper-parameters for DT model. Figure 7: Determination of hyper-parameters for RF model.