## 3 Results
### Regression Using SHAP  
In this section we present the main results of our proposed methodology, which focus on employing SHAP values to obtain analytical equations that approximate the predictions of the trained ML model. Furthermore, these equations can be constructed in an incremental manner, allowing accuracy to be increased at the cost of adding more terms that increase the complexity of the equations. To this end, we first obtained the SHAP values \(\phi_{i}\) for each feature and for each data point in the training set. We opted to compute these values on the training and test set separately because we wanted to utilize them to \"train\" our simplified equations and subsequently test them on the unseen test dataset. The execution time for the computation of SHAP main effects was low, requiring approximately 0.29 s on the aforementioned hard \begin{table}
\begin{tabular}{l c c} \hline \hline
**Metric** & **Formula** \\ \hline MAE & \(\dfrac{1}{N}\sum\limits_{i=1}^{N}|y_{i}-\hat{y}_{i}|\) \\ RMSE & \(\dfrac{1}{N}\sum\limits_{i=1}^{N}(y_{i}-\hat{y}_{i})^{2}\) \\ \(R^{2}\) & \(1-\frac{\sum_{i=1}^{N}(y_{i}-\hat{y}_{i})^{2}}{\sum\limits_{i=1}^{N}(y_{i}-\hat {y}_{i})^{2}}\), \(\quad y=\dfrac{1}{N}\sum\limits_{i=1}^{N}y_{i}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Formulae of the employed regression metrics; the true and predicted values are denoted by \(y_{i}\) and \(\hat{y}_{i}\), respectively, while \(N\) denotes the total number of data points. \begin{table}
\begin{tabular}{l c c c c} \hline \hline  & \multicolumn{2}{c}{**Log-Transformed**} & \multicolumn{2}{c}{**Original Space**} \\  & **Training** & **Test** & **Training** & **Test** \\ \hline MAE & 0.0487 & 0.0517 & 0.0524 & 0.0545 \\ RMSE & 0.0645 & 0.0723 & 0.0856 & 0.0870 \\ \(R^{2}\) & 0.9943 & 0.9932 & 0.9879 & 0.9879 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Regression metrics of the fully trained ML model on the training and test datasets. ware. Subsequently, we aggregated them using the mean absolute value and normalized the results to obtain the percentages, i.e., we computed the following Equation (5):  
\[\bar{\phi}_{j}=\frac{\phi_{j}^{{}^{\prime}}}{\sum_{j=1}^{M}\phi_{j}^{{}^{\prime} }},\quad\phi_{j}^{{}^{\prime}}=\frac{1}{N}\sum_{i=1}^{N}|\phi_{ij}| \tag{5}\]  
where \(\phi_{ij}\) are the SHAP values of the \(i^{\text{th}}\) feature for the \(i^{\text{th}}\) data point, \(N\) is the total number of data points and \(M\) is the total number of features. The results are shown in Figure 2. As can be readily observed, the most important features by far were the number of stories and the opening percentage of the panels, with an overall importance of approximately 50% and 30%, respectively. The stiffness of the masonry walls and the length of the spans had an overall effect of approximately 7-8%, respectively, while the influence of the number of spans was negligible. The core of the proposed formulation lies in providing analytical approximations to the obtained SHAP values. As discussed in Section 2.4, the SHAP values are additive and sum to the predictions of the ML model. Thus, the advantage of our proposed formulation becomes apparent, as it is possible to approximate the SHAP values of each individual feature and add as many terms as required to obtain the desired level of accuracy, guided by the feature importance hierarchy shown in Figure 2. The form of each individual analytical approximation is determined by the corresponding plot of the SHAP values. To demonstrate this, Figure 3 presents the scatter plots of the top two features, namely, the number of stories and the opening percentage, compared with the corresponding plots of the log-transformed fundamental period. For the opening percentage, we present the SHAP values corresponding to 0, 25, 50, and 75% opening percentage, as the bare frame case is treated separately. Figure 3: Scatterplots of the SHAP values of the top two features compared with the corresponding plots of the log-transformed fundamental period.