## 3 Database Development
### Database Development and Processing  
The response-prediction analyses utilized seven input variables, comprising the five randomly generated material properties (outlined in Table 2), the shear modulus of the masonry, and the intensity of the ground-motion record. The shear modulus for every analysis set was calculated from the corresponding values for [PERSON]'s modulus and Poisson's ratio (equal to 0.25) [31]. The range of shear modulus values used in the analysis was [248, 1193] MPa. The output variable was the maximum IDR of the URM building. Consequently, a database matrix of size 1080 \(\times\) 7 was employed in the development of the response-prediction models. The general predictive equation for the structural response prediction is as follows:  
\[Y_{MIDR}=f(X_{1},X_{2},X_{3},X_{4},X_{5},X_{6},X_{7}) \tag{1}\]  
where \(Y_{MIDR}\) is the structural response, which is the maximum IDR. The predictor variables include the modelling and ground-motion-related uncertainties: \(X_{1}\) is the mass density of masonry in kg/m\({}^{3}\), \(X_{2}\) is the compressive strength of masonry in MPa, \(X_{3}\) is the tensile strength of masonry in MPa, \(X_{4}\) is the shear strength of masonry in MPa, \(X_{5}\) is the Young's modulus of the masonry in MPa, \(X_{6}\) is the shear modulus of masonry in MPa, and \(X_{7}\) is the intensity measure from the earthquake records. PGA, one of the most commonly used Intensity Measures (IMs) in seismic demand analysis, was used as the IM. The effects of other IMs were not considered in the present study.  
In the context of collapse status identification, the maximum IDR of the models was also incorporated as an input variable, resulting in eight input variables. The output variable for the classification models is the damage state (DS1 to DS4). A database matrix with a size of 1080 x 8 was used in developing the classification-based ML models. The general form of the classification models is as follows:\[Y_{Damage}=f(X_{1},X_{2},X_{3},X_{4},X_{5},X_{6},X_{7},X_{8}) \tag{2}\]  
where \(Y_{Damage}\) is the damage states DS1 through DS4, the \(X_{1}\) through \(X_{7}\) variables are the same as those used in the prediction models, and \(X_{8}\) is the IDR of the URM building.  
In the next step, the original data were pre-processed to improve the performance of the machine learning models. The input variables \(X_{1}\) through \(X_{7}\) are transformed into logarithmic scale before fitting the models in order to reduce the nonlinearity in the models. The data obtained from the nonlinear dynamic analysis of the URM building archetype were then divided into training and test sets. The training set, which accounted for 70% of the data (756 data points), was used to train both the regression-based and classification-based prediction models. The remaining 30% of the data (324 data points) was used to test the developed models, which helped to determine their performance on unknown data.  
The correlations between the input variables were not considered in the study. The distribution of the damage states in the developed database is shown in Figure 7. Considering the scaling of the ground-motion records to 2.0 g and the comparatively lower load-carrying capacity of the URM building, 55% of the data falls under the collapse damage state (DS4).