Parametric and Machine Learning-Based Analysis of the Seismic Vulnerability of Adobe Historical Buildings Damaged After the September 2017 Mexico Earthquakes

ABSTRACT In September 2017, two strong earthquakes hit the central region of Mexico, producing substantial damage to the historical buildings. A retroactive analysis for assessing the pre-event seismic vulnerability of these constructions allowed for testing the suitability of an existing parameter-based approach based on material and geometrical features. More than 160 adobe buildings in four municipalities of the State of Morelos were surveyed and included in a vulnerability-oriented GIS database. Data were collected on-site and managed by resorting to open-source GIS software combined with a Python-based database management tool and a cloud-based platform for onsite data collection using mobile devices. The parameter-based approach was used for assessing the analytical seismic vulnerability of the buildings and implementing a secondary, more conservative assessment that considers uncertainties associated with the data acquisition process. The capabilities of the database were further used to train a Machine Learning algorithm aimed at overcoming some representativeness limitations of the parameter-based analytical method. This third approach was found to be suitable for assessing the vulnerability of the building typologies addressed in this investigation. Although the implementation discussed in this paper is limited to a specific vernacular typology, it can be used to conduct customized local calibrations.


Introduction
According to the United Nations International Strategy for Disaster Reduction (United Nations International Strategy for Disaster Risk Reduction 2009), vulnerability is defined as "the characteristics and circumstances of a community, system, or asset that make it susceptible to the damaging effects of a hazard".Assessing the seismic vulnerability of the existing building stock is critical to the definition and implementation of proactive and reactive seismic risk mitigation actions (Ferreira, Maio, and Vicente 2017;Salazar and Ferreira 2020).Nevertheless, the evaluation of large numbers of buildings poses numerous challenges related to the heterogeneity among existing constructions.This aspect is more explicit when dealing with historical buildings, typically subjected to many sources of uncertainty.Some common analytical strategies may be unsuitable for performing fast and reliable structural analysis at the urban scale (e.g., structural analysis based on numerical models), bringing attention to more empirical approaches based on the identification of characteristics that seem to enhance the seismic performance of structures.
A relevant precedent of this approach for Reinforced Concrete buildings has been developed by (Ruggieri et al. 2022), combining a typological classification of structures with a series of standard numerical models for building fragility curves.In this case, the data extraction is aided by Machine Learning algorithms, which label each building according to a series of externally recognizable features.This tool, known in the literature as Vulnerability Analysis using Machine Learning (VULMA) (Ruggieri et al. 2021), is composed of a series of modules that recognize typological patterns from raw data, including pictures.This process is possible given expert judgement-based training in which a series of categories are manually assigned.Although the need for fulfilling some typological assumptions constrains the application of this approach, it was found suitable for assessing large sets of constructions.
In the case of unreinforced masonry constructions, the approach developed by (Rosti, Rota, and Penna 2021) builds up on a preliminary categorization based on the classifications created after the Irpinia (1980) and L'Aquila (2009) earthquakes for building statistical distributions to get a set of relevant typological features that are then compared against the observed levels of damage.By following this approach, the authors have derived a set of empirical fragility curves representative of the seismic vulnerability of typologically compatible buildings.
This knowledge, based on long-term observations of failure and success, has determined constructive traditions and vernacular architecture principles worldwide.It is worth noting that the development of these empirical processes is not substantially different to the training of computational algorithms, in which a series of existing incomes and outcomes are analysed to find patterns and relations for predicting the outcome of new income data.

The earthquakes of September 2017 in Mexico
On the 7 th of September 2017, an earthquake (M W = 8.2) hit the south coast of Mexico.This event, later known as the Tehuantepec Earthquake, had its origin 133 km southwest of Pijijiapan (State of Chiapas).
There was extensive damage in the building stock, namely in adobe and unreinforced masonry structures in the states of Oaxaca and Chiapas (Godínez et al. 2019).On the 19 th of September 2017, the so-called Puebla-Morelos Earthquake (M W = 7.1) hit the south centre of the country (Figure 1).This event had its epicentre 12 km southeast Axochiapan (State of Morelos), ca.120 km away from Mexico City, producing the collapse of at least 46 structures in the capital (Alberto et al. 2018;Buendía and Reinoso 2019).Both events left behind a large number of houses with medium and severe damage in the central and southern regions of the country (see Table 1).

Impact and loss of historical buildings
According to the Global Assessment Report of Disaster Risk Reduction Atlas (United Nations Office for Disaster Risk Reduction 2017), seismic events in Mexico are responsible for annual average losses ranging between 1,001 and 2,000 million USD.The figures for the 2017 events are even more significant, with estimated reparations costs reaching between 2,000 and 4,500 million USD due to ca. 180,000 affected houses (ca. of 0.56% of the total of housing units registered in the national census).States like Oaxaca (6.07%), Chiapas (4.71%), and Puebla (1.79%) have been particularly affected, with around 6%, 5%, and 2% of their buildings stocks, respectively, heavily affected by the quake (Caprano, Ortiz, and Valencia 2018;Ramírez Eudave, Ferreira, and Vicente 2022).The Mexican Civil Protection authority (de la Republica 2017) estimated 369 human losses and 180.731 damaged houses (from which a 28% was reported as total loss).
In the context of cultural architectonic heritage, the Mexican Secretary of Culture estimated that some 2340 historical monuments were affected, including 1,680 temples built before 1900 (Ramírez Eudave and Ferreira 2021).Nevertheless, the number of damaged historical housing units is still unknown.These ancient houses are particularly significant in the states of Morelos and Puebla (commonly built in adobe), in which damages were proportionally more extensive (Galvis et al. 2017).Adobe structures in Morelos represent ca.4.5% of housing units (Sánchez Calvillo, Alonso Guzmán, and López Núñez 2021), reaching proportions of more than 20% in other municipalities (undefined).The development of a vernacular tradition of adobe structures in this region is closely linked to the occurrence of seismic events, shaping specific and adapted building typologies (Guerrero Baca 2019).The scale of damages in several settlements after the Puebla-Morelos earthquake urged immediate intervention due to the humanitarian crisis derived from the collapses and the lack of services, being declared as disaster zones (Ortiz et al. 2018).
A relatively common reaction to the loss or damage of adobe-based buildings was their replacement with new houses by using more industrialized building systems and technology, including prefabricated modules.This process is the product of one or several of the following situations (stated by the testimonials gathered during the fieldwork phase of this work): • There is a perception of adobe-based constructions as inherently dangerous and vulnerable towards seismic actions.This perception was reinforced after several official statements from the Mexican government (Zatarain 2017).• Adobe houses are perceived as outdated for some contemporary needs.• There is a lack of good workmanship and artisans for repairing and replicating the ancient construction techniques, and, therefore, quality work for adobe construction is often expensive when compared with more recent construction processes and technology.
• In many cases, access to public or private funds for reconstruction was subjected to the acceptance of architectonic criteria and features with no participation or intervention of the habitats and/or owners.Among others, the urgency to recover and rebuild after the seismic events leads to accepting these conditions.• Some owners had to invest their resources in reconstruction.These resources, often very limited, were insufficient for developing a proper architectural and engineering project, making their budlings less prone to earthquake actions.
Therefore, this substitution process was accompanied by the demolition of historical structures and even buildings that could be subjected to retrofitting and strengthening actions.Furthermore, the retrofitting and/or strengthening of adobe structures were perceived as more costly and relatively useless when compared to building new structures.This loss of cultural heritage represents a long-term impact to the detriment of both tangible and intangible assets (these constructions are the materialization of the accumulated knowledge of several generations).Moreover, this loss represents a hazard for sustaining long-term consolidated economic dynamics, such as the touristic attractiveness of some historical centres.As stated in the Historic Urban Landscape (HUL) guidelines (UNESCO 2016), the conservation of these environments is especially meaningful given the permanent nature of the loss of historical assets.For example, the municipality of Tepoztlán (State of Morelos) is very illustrative: the integration of landscape, urban, and historical architecture sustains strong cultural and ecotouristic activities that represent the main local economic activity (Alvarado and C 2015).
The study herein presented aims to explore assessment strategies for proactively identifying vulnerable constructions, admitting that prevention is preferable to reparation and substitution.This task is inscribed in Furthermore, according to the "Geoethics" principles (Peppoloni and Di Capua 2021), the awareness of potential risk situations is key to having successful public policies and represents a professional responsibility for developing better practices involving a more robust social role.Hence, the vulnerability assessment of historical constructions is complementary to cultural and economic sustainability and an opportunity for a more informed and participative decision-making process towards risk mitigation.

Outline of this study
This work´s first step is based on the use of a seismic vulnerability assessment approach extensively applied in European historical cities for analysing some Mexican built environments.This approach, developed from the Italian GNDT-II method (GNDT 1993), is based on the retroactive identification of material, physical, and geometrical parameters that seem to influence the seismic behaviour of masonry constructions.Therefore, the evidence of seismic events in the last three decades allowed us to enhance, enrich, and adapt this approach, leading to different variations and calibration of parameters for different regions and several cities.
For this method's purposes, the descriptive model of constructions considers a total of 14 parameters drawn from a straightforward survey.The first insight for applying this method was explored in the city of Atlixco, Puebla, finding the suitability of using the Mexican Catalogue of Historical Monuments for feeding the aforementioned survey (Ramírez Eudave and Ferreira 2021).Nevertheless, some limitations related to the uncertainties during data acquisition were found.A second experience with more than 80 buildings (Ramírez Eudave, Ferreira, and Vicente 2022) allowed having a better understanding of the suitability of this approach, its limitations and its possibilities.
The present study is aimed to explore the suitability of this method on a different Mexican traditional typology (that of adobe-based structures), based on the comparison between the levels of physical damage predicted by the method against the real effects, this is the observed physical damage that the 2017 Earthquake had, feeding a discussion about the representativeness of the vulnerability-oriented model and the studied built environment.Despite the VIM approach being mostly applied to stone or brick masonry constructions, the version adopted for this study (Ramírez Eudave, Ferreira, and Vicente 2022) explicitly accepts the suitability of assessing adobe-based constructions without performing specific calibrations.This capability of the parametric method is possible since adobe is part of the vulnerability classes defined and typified in the EMS-98 approach.
Given that we accept that the set of parameters is representative for conditioning the level of damage, it is possible to accept it as a Handcrafted Feature Extraction Technique (Dash et al. 2022).This means that a series of features that can be extracted from a certain element (in this case, buildings) are valuable for predicting a certain phenomenon (such as seismic structural response).Therefore, it is possible to use this methodology as a base for training a Machine Learning algorithm to recognize potentially different configurations of the vulnerability-oriented survey that better represent this sample, leading to a new potential use of the parameter-based methodology.

Materials and methods
This work was performed by following a series of field surveying campaigns in four different municipalities of the State of Morelos: Jojutla, Tepoztlán, Tlayacapan and Yautepec, in which there exists a complete and relatively updated Catalogue of Historical Monuments (INAH 2019).This research is aimed to compare the level of damage that the structures had in the context of two different approaches for predicting it: a parametric vulnerability index approach (considering both, a direct and a range-based application for addressing some epistemic uncertainties) and a machine learning algorithm for finding a more suitable model based on the method's survey.

Vulnerability Index Method (VIM): parameters and procedure
The version of the Vulnerability Index Method (VIM) herein used coincides with the one reported for Atlixco, Puebla (Ramírez Eudave, Ferreira, and Vicente 2022), in which the criteria for grading the parameters are extensively reported.Each parameter (see Table 2) is graduated in four different growing vulnerability classes (A, B, C, D) that represent how negative a given configuration is for the overall behaviour of the structure.Each grade is later associated with a numeric value C vi that is later multiplied by the parameter's weight p i (a numerical representation of the relative relevance that the parameter has among the set of all parameters) in order to obtain a weighted sum of all parameters as a global vulnerability index I � vf as per Equation 1, later normalized for obtaining a vulnerability value V (Equations 2 and 3).
An approach for estimating the damage grade μ D ¼ 0 : 5 f g given a certain seismic intensity is given in Eq.4.This expression includes a ductility factor for the structure Q ¼ 1 : 4 f g and represents a damage curve in which the macroseismic intensity is associated with a damage grade μ D , conceptually framed in the EMS-98 system (Centre Europèen de Géodynamique et de Séismologie 1998).A correction for the vulnerability is given in Eq. 5 for macroseismic intensities below 7.
A critical aspect of this approach is the correspondence between the mean damage grade µ D and a set of discrete damage grades D K , qualitatively characterized according to the macroscopic observed evidence of damage, as shown in Table 3.The VIM method was implemented for calculating the levels of damage that would theoretically correspond to the studied buildings when facing a seismic event with the intensity of the Puebla-Morelos earthquake (i.e., for obtaining values for μ D ).
The correlation between D k and μ D later permitted the comparison between the levels of damage obtained from the VIM approach against the real observed consequences (D k ) that the September 2017 Earthquake had on the assessed structures.For this purpose, the intensity information (in MMI scale) from the United States Geological Service was consulted (USGS 2017).The intensity maps for this earthquake lead to take an intensity M w ¼ 7 for the municipality of Jojutla, M w ¼ 7.1 for Tepoztlán and M w ¼ 7:3 for Yautepec and Tlayacapan (Sahakian et al. 2018).The ductility of all the structures herein analysed was based on the recommendations of the Complementary Technical Code for Seismic Design of the Building for Mexico City (Gobierno del Distrito Federal 2017), which is the reference for most of the country.This code recommends a value of Q ¼ 1 for unreinforced masonry.4.00 5.00

Data management and acquisition framework
A Geographic Information System environment was used for storing and managing the data of this study, given the advantages of having a geographic reference for identifying each construction during the on-site campaign.The open-code and free software QGIS (version 3.12 București) (QGIS Development Team 2021) was selected for this purpose.A convenient capability of using QGIS for assembling the database was the use of the plug-in Mergin (Dobias, Sab Varga, and Petrik 2021), a cloud-based storage service that allows the access and edition of the QGIS file from multiple mobile devices, such as smartphones equipped with the app Input (Ramirez Eudave et al. 2023).
The survey was programmed as an attribute table for the layers that would later store the polygons corresponding to the constructions, containing a total of 68 fields for storing field data and assessment results (see Table 4), including qualitative, quantitative, and Boolean data.Besides having this geographic database as a Geopackage file, a python-based front-end was programmed for performing reading and edition actions on the database.This front-end component integrates the possibility of calculating the vulnerability index and the levels of damage based on the parameters stored in the GIS database.The purpose of this script is to facilitate data management and calculations while keeping the integrity of the primary database (see Figure 2).

Characterization of the sample and field surveying
Given the affinity of the National Catalogue of Historical Monuments regarding the parameters  considered in the VIM, those municipalities with the larger samples of catalogued buildings were selected.Among these municipalities, those whose entries in the Catalogue were completely fulfilled were preferred: Jojutla, Tepoztlán, Tlayapacan, and Yautepec.It is important to note that only constructions destinated to housing were considered for this study, discarding other historical structures such as churches, agricultural complexes or other industrial facilities.Although the presence of adobe constructions in these municipalities is variate (Table 5), the assets considered in the National Catalogue of Historical Monuments (i.e., constructions built before the year 1900) are predominantly adobebased constructions.
An original indicative list of 198 constructions was prepared, as shown in Table 6.These constructions were visited to perform visual inspections to accomplish the vulnerability survey and correct any outdated information from the National Catalogue of Historical Monuments (NCHM).This campaign led to the exclusion of several constructions (for example, some buildings were inexistent or structurally heavily modified when the earthquake hit) profiling a final universe of 167 valid cases that were characterized, stored, and analysed.
The fieldwork allowed the accomplishment of a series of activities: (i) Visual confirmation of the descriptive information contained in the National Catalogue of Historical Monuments.The position of the construction was confirmed or corrected.Then, the information contained in the Catalogue was compared against the field data gathered, leading to corrections, if necessary.(ii) Photographic register of the interior and exterior.All constructions were at least registered by the exterior.In many cases, access was not allowed or restricted.When access was not permitted, the interior description of the constructions was based on the content of the National Catalogue of Historical Monuments.It is convenient to recall that only buildings with a complete datasheet (i.e., with architectonic floor plan, photographs, and descriptions) were considered valid samples during the preliminary selection.(iii) Damage questionnaire to the owners/users of the constructions.Besides communicating the goal and procedure of the fieldwork, the users were asked to describe the type of damage that structures had after the 2017 Earthquakes.The diagram that illustrates the classification of damage to masonry buildings in the EMS-98 scale (Centre Europèen de Géodynamique et de Séismologie 1998) was shown to better classify the level of damage (see Figure 3).(iv) Geometrical measurements (e.g., exterior measures for contextualizing the architectonic plan drawing of the Catalogue).(v) Register of information for grading vulnerability index parameters.
Many of the fields were able to be directly registered on-site by using the app "Input" for editing the GIS database.In some cases, quantitative vulnerability index  parameters were able to be graded only after performing some calculations, assisted by the python-based front end.
Although there is a certain variability throughout the sample, most of the assessed constructions (see Figure 4) share several characteristics.
The vernacular typologies found in these municipalities are common to most of the State of Morelos and present little variations (Quintana Leonardo and Guerrero Baca Luis 2010).These houses commonly consist of a single-storey level (ground) room with a rectangular plan configuration for rural areas, whilst urban houses present a series of rooms of similar sizes, internally connected and aligned with the street (Figure 4).
The most common structural solution is one-leaf adobe walls built with units of ca.52 cm in length, 36 cm in width, and 9 cm in thickness.Although there are no additional means of reinforcement or strengthening, there is good interlocking and layering and most constructions have visible stone foundations.Most foundations reach a height of between 0.50 and 1.00 m from the level of the street, mainly as a strategy for isolating the adobe walls from the soil humidity and rainwater (Figure 5).The most common roof solution is a planepitched roof that facilitates rainwater collection by the means of dedicated ceramic pipes.The openings in these constructions are proportionally small, solved by means of timber lintels or stilted arches.
The adobe walls present earth-mortar joints in which small ceramic pieces or stones are embedded to offer better protection (Figure 6).The adobe units are visibly homogeneous, and only two elements are easily recognizable: the earth matrix and fine vegetal fibre elements.
All the local inhabitants that were inquired about the typical constitution of adobe bricks described the production of adobe from a mixture of the soil available onsite and horse manure that is compressed in wooden formworks and sun-dried.Even if many of the constructions have no external render, the inhabitants often state that this is a relatively recent tendency,  mostly for offering an attractive "rural" visual landscape for tourism purposes.
The physical damage of the number of structures assessed was classified as per the EMS98 scale and is summarized in Table 7.

Results and discussion
The results analysis for this experiment had three main stages.The first approach consisted of a direct comparison between the observed damages and the mean damage grade estimated using the seismic vulnerability index approach.A second stage of analysis considered some limitations found during the fieldwork campaign and, finally, a third stage considered the use of Machine Learning algorithms for assessing how suitable is its use for predicting the levels of damage and calibrating the weights of the Vulnerability Index Method for specific typologies and built environments.

Simple parameter-based analysis
It is important to note that the qualitative scale for classifying the observed post-seismic damages on structures corresponds to intervals for mean damage grade μ D .The first comparison for assessing the suitability of the method on the given number of building cases consisted in checking if the analytical value obtained for μ D was comprised in the permissible range of the real/observed damage D k;2017 (see Figure 7).A total of 104 out of the 166 cases (62.28%) present coincidence between the predicted μ D and observed D k;2017 levels of damage (see Table 8).
When the method fails at predicting the level of damage, it is often an underestimation of it (i.e., analytical levels of damage were less severe than the real damages observed and described in situ).It should be noted that the semantic descriptors used in the VIM approach for modelling the built environments (type of structures, materials, etc.) were enough for describing the buildings herein presenter.Nevertheless, it is pertinent to consider that some relevant phenomena or characteristics may not fit in this survey model.
For example, despite the general conservation status of the construction being a parameter assessed for determining the vulnerability to seismic actions, earth-based structures may have more specific deterioration issues and fragility due to moisture content in structural elements.This specific defect is not included in the original approach but can intuitively be significant for assessing the state of construction.This observation becomes even more relevant when considering the number of constructions that had lost the external renders for aesthetic reasons.This discussion is not further developed in the context of this article since the moisture content of the constructions at the moment of the earthquake is unknown.Nevertheless, it provides an opportunity for discussing, enriching, and adapting the VIM survey for future experiences.
Another reasonable explanation for this lack of representativeness is related to a condition that worsens the structural behavior, such as an unfavourable soilstructure interaction.Besides, a certain grade of unrepresentativeness can be a consequence of the limitations for having reliable data acquisition, namely, due to field restrictions (inaccessibility, lack of safe conditions for performing field works, etc.).

The role of uncertainty
Given the access limitations during the fieldwork and the consequent uncertainties in the evaluation associated with certain parameters, it was decided to take into account the Quality Check (QC) approach proposed for the city of Atlixco (Ramírez Eudave, Ferreira, and Vicente 2022).This approach adds a code for each parameter to express how reliable the data acquisition process (and, therefore, the grade assignation) was.
The four possible values for the QC are: QC0: High reliability.Grade verified with a high level of certainty.Data are explicitly contained on the datasheets and have been verified in situ.
QC2: Low reliability.Inferred based on typological similarities and hypothesis based on experience.
QC3. Absence of information.The grade is merely indicative but still better than a random decision.
Parameters for which the reliability of the evaluation was considered to be QC0 or QC1 level, no further action is taken and the vulnerability classes assigned for that parameter are accepted.Otherwise, the hypothesis of having a lower vulnerability class than the initially proposed is sustained.Therefore, an alternative conservative assignation of the vulnerability class is adopted by downgrading one or two classes, , respectively, for QC2 and QC3 (e.g., from A to B or from A to C).As an example, in a construction for which access was not granted, the surveyor may decide that the inner conservation status (assessed by parameter BP13) is good, according to typological similarities and previous experiences.But, since no visual confirmation was possible, a QC2 reliability level must be assigned to this parameter.This means that the vulnerability-oriented survey will initially consider BP13 with a grade A, whilst the conservative boundary of the vulnerability index will be calculated assuming that this same parameter can have a grade B (or C, in case of having a QC3).
Therefore, the mean damage grade μ D becomes an interval with two boundaries: a lower limit that corresponds to the vulnerability class initially given during the field campaign and an upper limit that correspond to a more conservative assessment in which the uncertainties have been considered, as the safe side definition.
This approach is possibly easier to understand when expressed graphically, as shown in Figures 6 to 13.For each building, the boundaries for the analytical damage range, μ D and μ D;conservative (obtained by applying the VIM), are represented through a black horizontal bar and a cross, respectively, while the intervals for the discrete qualitative observed damage grades assigned (the real damages observed in the building) are represented through a white bar, facilitating the interpretation of the overlapping among both intervals.
With this approach, the vast majority of predicted damage intervals overlap with the corresponding intervals of observed damages (see Table 9).This observation is consistent with the results reported for Atlixco, supporting the feasibility of the joint use of an alternative and more conservative value for assigning an interval for the physical damage instead of closed and nominal values.Nevertheless, this approach does not solve the potential lack of representativeness associated with the conceptual models used in the VIM approach.Even if the calibration and adjustment of the methodology by means of analytical approaches are possible, the experience herein presented explores the suitability of resourcing to machine learning tools for predicting the damage grades from the set of parameters already acquired, unveiling hidden patterns and potential redistributions of the weights originally proposed.

Machine learning approach
The use of trained algorithms for recognizing patterns and subjacent relations has been demonstrated to be suitable for numerous problems in which the relations between input data and outcomes (results) still present hidden or not well-defined mechanisms.Given that the proposed procedure is intrinsically attached to a regressive analysis of cause-effect elements based on categories (both for the parameters and the damages), the use of computational analysis is a strong and suitable measure for expanding the boundaries of this methodology.
It is important to note that the VIM approach is based on an existing empirical parameter-based methodology built on the evidence of past events: the analysis from numerous seismic events, the classification of the structures and their damages, representing a process of domain knowledge Handcrafted Feature Extraction.This process is critical for recognizing which descriptors (features) are more important for determining an outcome (Guyon and Elisseefl 2006).For the case of the seismic vulnerability of masonry structures, this feature extraction has been empirically conduced and refined based on numerous observations, leading to determining the set of 14 parameters used in this investigation.This approach is a response to the limitations that robust structural analysis (strongly customized in the case of historical structures) has when dealing with large numbers of buildings or constructions to be assessed.

Machine learning principles
Although the use of Machine Learning and Deep Learning approaches (subfields of Artificial Intelligence) for studying complex processes is not new, their use in the context of complex civil engineering applications is not generalized yet.A relatively recent field of application of Machine Learning algorithms is the health monitoring of historical structures and heritage buildings, in which heterogeneity, complexity, and variability are still relevant challenges for more generalized approaches (Mishra 2021).
The use of these resources should always be accompanied by awareness regarding their limitations, bias and the limits of the control that the user has towards the several "black boxes" that these processes imply (Vadyala et al. 2022).It is possible to obtain apparent accurate predictions and structured models even from weak evidence and scarce data.Therefore, to have a robust control of the representativeness of input data, the integrity of data and the correct selection of models and cases are critical aspects to consider.In this case, the existence of a precedent data model (that of VIM) is useful for contextualizing the results obtained when performing the Machine Learning algorithm design and assessment.

Implementation
The approach adopted for this case study accepts a series of assumptions related to the type and quality of data.The most important one is that the labelling of the input and outcome data has been directly adopted from the VIM methodology.In other words, the parameters, grading, and levels of damage have been adopted as is, so the database used in the previous sections did not suffer alterations.
The general workflow herein presented is that proposed in the documentation of the freeware learning library scikit-learn (Pedregosa et al. 2012).This library supports many of the most common classification, regression, and clustering algorithms for Python programming environment, namely through the NumPy  library.The implementation herein presented was programmed as part of the database front-end manager to work within the original database (Ramirez Eudave 2022).

Importing data
The vulnerability database was built in a GIS environment using Geopackage files in native format.Thus, the management of the database was held by means of GeoPandas, a Python open-source library that supports the management of geospatial information as well as more typical non-geographical data frames.This library allows the management of GIS native files (Geopackages, shapefiles, etc.) as tabular data keeping the integrity of georeferenced information.Therefore, these capabilities allowed us to read and import the database, namely the 14 parameters (and their associated vulnerability classes).
For this process, it becomes critical to assign labels and recognize which components of data represent features and target outcomes.In other words, it is necessary to identify which data is meaningful for conditioning the outcome.For example, the database includes the address of the constructions, an information that is not critical to explain the level of physical damage of the structure.Nevertheless, this dataset already contains 14 labelled parameters (the labels are the parameters' classes) that we already consider valid for defining and estimating the level of damage (i.e., the outcome) of a structure in the context of a determined earthquake.The process of recognizing these features is part of the so-called Handcrafted Feature Engineering,      which can otherwise be performed by the means of domain knowledge or other approaches.
Given that this process is an inherent part of assuming the VIM methodology, all the 14 parameters considered in the database are meaningful for defining the level of physical damage (outcome) of the structure.Nevertheless, in contrast to the VIM approach, the ML algorithm does not assess the parameters from a given weighted importance (i.e., the only information the algorithm has is that the parameters are related to the outcome).Instead, the ML algorithm will fit a distribution of weights per parameter that represents a more fitted and representative model.
This clarification is especially relevant because, in contrast, some ML processes are also aimed at the identification of learned features from raw data (Khurana, Samulowitz, and Turaga 2018).

Cleaning and splitting data
This step was performed in the scope of input data presented in sections 3.1 and 3.2, in which the integrity of the database and the completeness of entries were verified.According to the good practices reported in similar classification problems, 20% of data were reserved for performing verification tests.This fraction may vary according to several criteria and the size of the sample, but common practices in this field often accept an interval of 15-20% as a reasonable ratio.

Creating a model (algorithm selection)
The selection of a suitable algorithm is one of the most critical steps for representing a problem with Machine Learning tools.For this exercise, a Supervised Learning approach (i.e., data for training associates sets of features with specific outcomes that are expected to further predict new sets of features) was carried out.Given that the target outcome consists of discrete damage grades (a level of damage D K ¼ 0; 1; 2; 3; 4; 5 f g), the model has been categorized as a classification problem (i.e., data is labelled with two or more classes and the Machine Learning processes would find valuable vectors for pointing outcomes from the labelled features.As schematized in Figure 14, the field dataset (the 166 observations that include the parameter's grading and the real post-seismic levels of damage) is used for training the RFC algorithm, so the algorithm recognizes patterns between the parameters and the levels of damage.This trained model replicates these patterns for predicting the outcomes that can result from a given combination of parameter grades.The prediction can be used for obtaining outcomes from new samples and/or assessing the accuracy of the model by predicting already-known outcomes.In this case, 20% of the data was reserved for performing this assessment process.The problem herein presented is a classification and regression task since the parameters are given but their relative impact on the outcome is not provided to the algorithm.If some parameters (features) of the income data are not useful, this algorithm minimized/reduces its relative sensitivity on the model.
By following the observations of (Buitinck et al. 2013), this problem can be modelled by the means of the Random Forest Classifier (RFC) learning algorithm.This algorithm ensemble numerous decision trees (i.e., flowchart models in which an outcome is a product of a specific path of several conditional statements or nodes) that fit fractions of data instead of creating a unique tree model.This algorithm prevents model overfitting by using multiple trees and the so-called bagging method.As schematized in Figure 15, the bagging process consists in randomly splitting the complete dataset into a series of equally sized datasets.Since the selection is randomized, each observation can appear in more than one tree.The number of trees is not limited by the number of observations of the dataset.Each subset is used for training a customized individual decision tree (i.e., for fitting a partial model based on the subset of observations).When a new observation is introduced to the model, each tree "votes" according to its particular training.The complete model assigns an outcome based on the overall "votes" of the partial decision trees.The sum of all these random trees represents the so-called "Random Forest".
Among the many available algorithms for performing classification works, the RFC was considered especially suitable because does not make assumptions about the underlying distribution of data and because it permits a better understanding of the relative influence that the features have (assuming that all the selected features are meaningful).
Given that this classification problem departs from an already-established survey (that has been tested, calibrated, and enriched based on the evidence of multiple seismic events) instead of raw data, we accept that all the features are valid and influence the outcome.There is a subjacent decision-tree structure for the VIM analytical procedure.The conceptual compatibility between the analytical development of the VIM approach and the RFC is therefore considered key for comparing both techniques.
The application of RFC for modelling seismic vulnerability-related phenomena has some relevant precedents, such as the mapping based on damages after seismic events (Han et al. 2020), post-earthquake reconnaissance for reinforced concrete structures (Midwinter, Yeum, and Kim 2022) and structural elements damage models (Lei et al. 2020).

Training the model, making predictions and evaluating the model
The model herein presented was trained using the hyperparameters (parameters whose values control the learning process and determine the values of model parameters that a learning algorithm ends up learning) setup summarized in Table 10.No relevant characteristics of the dataset seemed to be critical for rejecting the default settings, except the number of trees, which was set according to the observations of (Oshiro, Perez, and Baranauskas 2012).Given the nature of this classification problem (a relatively simple one), no further adjustments were needed.
A series of predicted classifications were obtained by using the data reserved for testing the model (34 random samples), integrating a new data frame that allowed the comparison between the real outcomes (the D K, 2017 levels of damage) against those predicted by the model (Figure 16).
This process allowed us to understand how representative and effective the model is.The metrics for evaluating the model were obtained by using the classification report embedded in the Sklearn package (see Table 11).This report offers three main metrics for each class:  belong to that class.This ratio expresses how many relevant identifications were retrieved.(c) F1-score.Represent the harmonic mean between precision and recall, representing the performance of the model.
An explicit representation of the results is the confusion matrix, in which the correspondence between the true and predicted labels (i.e., discrete levels of damage) is shown in Figure 17.This confusion matrix exhibits how most of the classes were correctly identified by the model, but there is a lack of representativeness in identifying the highest level of damage D K ¼ 5.This phenomenon can be easily associated with the relatively small number of samples used for training purposes in this class (4 out of 167, 2.4%; however, it appears only once in the test split of the sample) since this is the most infrequent class, it is expected to be less likely recognized by the algorithm.It is possible to retrieve which is the relative impact that every parameter has in the classification process.At this point, it becomes convenient to be aware of the limits imposed due to the variability throughout the sample, i.e., the impact of a determined parameter will be smaller if it does not present relevant variations for differencing samples.The sample herein studied presented relatively small variations in some parameters given the typological coherence amongst the structures (Figure 18).The feature importance (see Figure 19) of the model reflects this phenomenon.
The model for this sample exhibits relatively low importance for certain parameters, such as BP3 (Conventional strength), BP5 (Number of floors) and BP14 (Non-structural elements), which is consistent with the typology observed in situ: one-storey constructions with no remarkable features in the facades and with similar plan distributions.On the other hand, parameters such as BP2 (Quality of the resisting system), BP7 (Aggregate position) and BP13 (Conservation state) are critical for assigning a vulnerability class.Regardless of the physical meaning of these parameters, the algorithm identifies that BP2, BP7, and BP13 seem to have a more consistent effect in the outcomes, and it determines that these parameters are strongly conditioning the results.It is convenient to recall that, therefore, this weight distribution can be seriously limited when analysing a very different typology that would become an "outlier", such as a building with more than three storeys.
The most obvious way for improving this approach is to enlarge the dataset to enhance the representativeness of extreme values.The generation of synthetic data under the assumption of normality was considered.To check the suitability of this approach (e.g., by using Montecarlo or Latin Hypercube sampling methods), the normality of the distribution of the observed level of damage was assessed by the means of the Kolmogorov-Smirnov test.The normality hypothesis H 0 is not supported at a significance level α ¼ 0:05, obtaining P-values<0.00001 and, therefore, this experiment is not suitable based on the existing evidence and the dataset was not enlarged.This procedure would have been useful for enlarging the dataset without losing its representativeness and having a larger number of extreme observations.It is important to keep in mind that larger datasets obtained in situ may provide evidence for finding representative statistical distributions for the levels of damage.

Final remarks and future work
This work presents a series of processes based on the vulnerability assessment of structures damaged as a consequence of the 2017 earthquakes in the centre of Mexico.A total of 167 constructions were surveyed to obtain a set of 14 parameters that allowed the estimation of vulnerability index and consequently the determination of mean damage grade when subjected to a determined intensity earthquake.
The sample herein presented corresponds to a typologically homogeneous housing dataset distributed throughout four municipalities of the State of Morelos, emphasizing the predominance of adobe-based structures.All the constructions were surveyed in situ, accomplishing a database containing the pre-seismic characteristics of the buildings.This process was possible with the support of the National Catalogue of Historical Monuments, interviews with the building owners and users and visual in-situ inspections.The level of physical damage that every construction evidenced/experienced was compared with the predicted level of damage according to the VIM methodology.
A first attempt consisted of the direct application of the method, neglecting some sources of uncertainty identified during the surveying campaign (incompleteness of information, the impossibility of accessing all constructions, etc.), resulting in a 62.28% of acceptable agreement (i.e., the estimated damage was comprised with an interval of the real/observed damage).
A second exercise was developed by enriching the method with the addition of a quality check in which the uncertainty for assigning a certain vulnerability class is accepted and integrated for obtaining an alternative, more conservative, level of physical damage.This process led to having two values (that of the first attempt and a conservative one) for constituting a range for the mean damage grade.This approach was revealed to have a better fitting with the field observations since 93.41% of the predicted and real/observed defined intervals are overlapped.
A third approach was performed by the means of Machine Learning techniques, specifically by using a Random Forest Classification algorithm.This algorithm was trained for solving the categorization of the level of damage by establishing other relations among the parameters rather than the one used for the analytical approach.Despite the overall performance of the model, it is considered satisfactory (with an accuracy score of 94.12%), since these results are limited to the size and typology of the sample.The analysis of the proportional importance of the parameters demonstrates that the trained model would not be suitable for assessing constructions with a very different typology.Furthermore, the number of samples, specifically in what concerns the relatively small number of samples for the extremes of the levels of damage (no damage at all or total collapse, corresponding to D k = 0 and D k = 5 respectively) difficult to have a good representation of these constructions.Since the normal Gaussian distribution of damage throughout the sample cannot be statistically sustained, some approaches for generating synthetic data are not suitable.Therefore, the size of the  Maximum number of features provided to each tree "Auto" bootstrap Data point sampling method.When set as "true", there is a replacement.

True criterion
The method used for measuring the quality of a split.Gini sample is considered a limitation for obtaining more conclusions than the ones presented in this work.A necessary further development in this sense is the creation of larger datasets (based on precedent seismic events) that can be used for finding typical statistical distributions as well.
The assumption of using this algorithm as a suitable tool for similar problems is sustained given the positive results of classifying the buildings into five damage classes.The evidence of typological fitting of the model is consistent with some empirical observations on site and offers an interesting field for enhancing the capabilities of the VIM approach by adjusting the relative weight of the parameters for diverse typologies in which there are enough data for training the model.In other words, it is possible to take advantage of the vulnerability survey as a Handcrafted   Feature Extraction base for developing straightforward models under the basis of regional and/or typological sets.The implementation process presented and discussed in this article prove that the weights originally assigned to the VIM parameters can be adjusted to obtain a better fit (for better representing) to the common vernacular typology found in Morelos.Based on this observation, it is thus possible to affirm that this same process can be applied to develop customized models for locally built environments.The existence of information regarding previous seismic events (characterization of the constructions, levels of damage, etc.) can be used to train this ML algorithm and predict the effects that future seismic events may have on specific buildings typologies.
The tools developed for this experimental program (namely those related to data acquisition and management)  make possible the systematization and analysis of existing and new data within the workflow herein presented.

Figure 1 .
Figure 1.USGS Shake maps for the Pijijiapan (left) and Puebla-Morelos (right) Earthquakes (Geodetic Facility for the Advancement of Geoscience 2023).
damage.Cracks around openings; localized detachment of wall coverings (plaster, tiles, etc.).damage.Opening of large diagonal cracks; significant cracking of parapets; masonry walls may exhibit visible separation from diaphragms; generalized plaster detachment.severe damage.Façade walls with large areas of openings have suffered extensive cracking.Partial collapse of the façade (shear cracking, disaggregation, etc.). .Total in-plane or out-of-plane failure of the façade wall.

Figure 3 .
Figure 3. EMS-98 five damage grade scale (Centre Europèen de Géodynamique et de Séismologie 1998) and examples of buildings with corresponding damage grades from 1 to 5 in the studied municipalities.

Figure 6 .
Figure 6.Typical adobe configuration in a house in the municipality of Tlayacapan.

Figure 7 .
Figure 7.Comparison the intervals for the permissible range of observed damage (bars) and analytical damage (black crosses) by sample.

Figure 8 .
Figure 8. Analytical and real damage grade intervals for the municipality of Jojutla (1 of 2).

Figure 9 .
Figure 9. Analytical and real damage grade intervals for the municipality of Jojutla (2 of 2).

Figure 10 .
Figure 10.Analytical and real damage grade intervals for the municipality of Tlayacapan.

Figure 11 .
Figure 11.Analytical and real damage grade intervals for the municipality of Yautepec (1 of 2).

Figure 12 .
Figure 12.Analytical and real damage grade intervals for the municipality of Yautepec (2 of 2).

Figure 13 .
Figure 13.Analytical and real damage grade intervals for the municipality of Tepoztlán.
(a) Precision.The ratio of successful identifications of a class divided by the number of times that the label was predicted in the model.This is the ratio of the true positives divided by the sum of true and false positives.(b) Recall.The ratio of successful identifications of a class divided by the number of samples that

Figure 14 .
Figure 14.Flow diagram of the training and prediction processes.

Figure 16 .
Figure 16.Schematization of the evaluation of the model.

Figure 17 .
Figure 17.Confusion matrix.True values correspond to observed levels of damage.

Figure 19 .
Figure 19.Relative importance by feature according to the RFC model.

Table 1 .
Affected housing units per State as a result of the Earthquakes of the 7 th and 19 th of September, 2017 (de la Republica 2017).

Table 3 .
Correspondence between discrete damage grades and ranges of mean damage grade.

Table 4 .
General composition of the QGIS layer attribute table.

Table 5 .
General description of the housing environment for the studied municipalities according to the Census of 2014 (undefined).

Table 6 .
Number of buildings/cases considered per municipality.

Table 7 .
Number of structures assessed by municipality and level of damage.

Table 8 .
Summary of successful predictions for the level of physical damage.

Table 9 .
Summary of samples in which the observed and estimated damages are overlapped.

Table 10 .
Hyperparameter setup for training the RFC algorithm.