# Machine Learning Algorithms for the Prediction of the Seismic Response of Rigid Rocking Blocks
## 5 Summary and Conclusions  
In the present paper, we applied ML algorithms to the problem of predicting the response of a rigid block under seismic excitation. On the one hand, we considered the problem of whether or not the block is overturning, and we used classification algorithms to approach it. On the other hand, we considered the problem of predicting the maximum rotation of the block in the cases where it does not overturn, and we used regression algorithms for our modeling. Departing from previously established literature, we predicted this maximum rotation directly instead of computing the whole time history of the rotation. We obtained a classification accuracy on our test dataset of 95%. That indicates the overall success of the algorithm to accurately assess the safety of the rigid rocking block under seismic excitation. In addition, the classification metrics are approximately equal for both classes, enhancing the reliability of the predictions. Finally, the algorithms exhibited no overfitting since the training and validation loss curves are very close. That indicates that the model generalizes well and its predictions are reliable on completely unseen data. Similarly, for the regression task, we obtained an \(R^{2}=0.89\), with a mean absolute error of 0.04 on the test dataset. The RMSE was higher (\(\approx\)0.078), and this is due to the presence of a few very large errors. However, we observed that the model is unbiased, i.e., both the mean and median of the errors are very close to 0. In addition, the errors appear to be symmetrically distributed around 0, and in conjunction with the absence of bias, this implies that the model does not systematically over or underestimate the true values. Finally, similar to the classification task, Figure 9 demonstrates that there is no overfitting in the model; thus, its predictions are reliable on completely unseen data. Overall, the results are encouraging and support the applicability of such methods to dynamic analysis problems, without the need to perform time-consuming and computationally intensive simulations. Since the rocking phenomenon is highly sensitive to parameters' variation, the design of these systems should be treated probabilistically. From this point of view, the trained model can be used to rapidly generate a vast amount of response data to evaluate seismic fragility, which is a key component for seismic design and assessment. Potential future research steps could include the analysis of patterns on the misclassified input vectors, or cases where the regression error is very large. That could improve the already very good performance of the algorithms. Finally, the applicability of this method to similar dynamic problems could also be explored. Figure 9: Training loss curve of the two best-performing regressors. (**a**) Training loss curve of ANN. (**b**) Training loss curve of gradient boosting. **Author Contributions:** Conceptualization, K.E.B. and I.E.K. ; methodology, I.K., K.E.B., I.E.K., L.I. and A.E. ; software, I.K., K.E.B., I.E.K., L.I. and A.E. ; validation, I.K., K.E.B. and I.E.K. ; formal analysis, I.K. and K.E.B. ; investigation, I.K., K.E.B., I.E.K., L.I. and A.E. ; resources, I.E.K., L.I. and A.E. ; data curation, I.K., K.E.B., I.E.K., L.I. and A.E. ; writing--original draft preparation, I.K., K.E.B. and I.E.K. ; writing--review and editing, A.E. and L.I. ; visualization, I.K. and K.E.B. ; supervision L.I. and A.E. All authors have read and agreed to the published version of the manuscript. This research received no external funding. The following abbreviations are used in this manuscript: