## 5 Model Evaluation  
### Single ML Models  
The shear capacity prediction model for RCSWs is constructed using the two ML models, DT and RF. To enhance the model's generalization performance and prediction accuracy, hyperparameters are tailored to the models' input parameters. The hyperparameters of DT and RF ML models are optimized by a grid search and their performance is evaluated on a test set. The grid search traverses a predefined dictionary of models and performs a grid search for each model to debug its hyperparameters. Negative Mean Square Error (MSE) is computed through 5-fold cross-validation, and the best model is used to predict the test set and compute the MSE, which helps to select the best-performing model. Table 2 summarizes the optimal values of hyperparameters for DT and RF; for DT, the optimal values are a maximum depth of 10, a minimum number of leaf samples of 1, and a minimum number of division samples of 5, which helps to prevent overfitting. For KNN, the optimal number of neighbors is 7, the weights are distance-weighted, and the metric is chosen as the Manhattan distance. Each value of the above hyperparameter optimization was inputted into the corresponding model and the trained model's predictive performance was assessed; the anticipated values are displayed in Figure 5 to compare with the test values, with the training set data in blue and the test set data in orange. By displaying the error metrics for both datasets, it helps the readers obtain a complete picture of the model's performance and visually compare the model's performance during training with its performance on \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Models** & **Hyperparameters** & **Search Space** & **Optimal Value** \\ \hline \multirow{2}{*}{DT} & max\_depth & [None, 5, 10, 20, 30, 50] & 10 \\  & min\_samples\_leaf & [1, 2, 4] & 1 \\  & min\_samples\_split & [2, 5, 10] & 5 \\ \hline \multirow{3}{*}{KNN} & n\_neighbors & [1, 3, 5, 7, 10, 15] & 7 \\  & weights & [’uniform’, 'distance’] & distance \\ \cline{1-1}  & metric & [’euclidean’,’manhattan’, 'chebyshev’] & manhattan \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Optimized values of hyperparameters for a single model. unknown data. This helps to assess whether the model is overfitting and allows the reader to see more clearly how the model learns and generalizes to new data. Table 3 shows the prediction metrics of the established ML models, DT and RF. Combined with Figure 5, it can be seen that, first of all, DT's RMSE in the training set is 2.39, which shows a good fitting ability, but its RMSE in the test set is as high as 279.4, which suggests that the model may suffer from a strong overfitting phenomenon. In contrast, the RMSEs of the KNN are 269.7 and 281.8 on the training and test sets, respectively, and although the difference is not significant, its overall performance is more stable, indicating that KNN has a stronger generalization ability. The MSE for the training set of DT is 5.7, and the test set is as high as 78,078.9, which further verifies its overfitting on the training data. The MSE of the KNN's training set is 71,374.4 and the test set is 79,421.5, which is not a big difference between the two and shows some robustness. For the MAE, the DT is only 1 for the training set and jumps to 116.2 for the test set, showing the model's lack of prediction accuracy on unknown data. The KNN's MAE is 103.4 for the training set and 137.9 for the test set, and it means a higher level of error. For the R\({}^{2}\) metric, DT has an R\({}^{2}\) of 1 in the training set and 0.94 in the test set, showing an almost perfect fit on the training data while still maintaining a high explanatory power on the test set. KNN has an R\({}^{2}\) of 0.91 and 0.94, reflecting a slightly lower performance than DT in the training set but a similar explanatory power on the test set.