# Investigation of Structural Seismic Vulnerability Using Machine Learning on Rapid Visual Screening
## 3 Results  
In this section, we present the results of the present study. As was mentioned in the Introduction, the goal of this study is twofold: on the one hand, it aims to demonstrate that the proposed formulation, as presented in Section 2.2, outperforms the currently established engineering practices in terms of the seismic vulnerability ranking for all the studied Seismic Codes, some of which are the most applicable at an international level. On the other hand, it aims to employ the fully trained Machine Learning models in order to propose a potential recalibration procedure of the aforementioned Codes. In order to measure the efficiency of the ranking, we compare it with the \"ideal\" ranking, i.e., how a human would rank the given structures, having perfect knowledge of their damage labels. Indeed, according to this \"ideal\" ranking, the first 93 structures should be the ones that suffered total or partial collapse (Black), the following 100 structures (post undersampling) should be the ones that were severely damaged, but did not cross the CLS (Red) and so on. Using the above, the predicted ranking can be subdivided into bins, where each bin's size is the number of structures of the corresponding damage label. In addition, given a damage index \(d\in\{\text{Black, Red, Yellow, Green}\}\), let \(bin_{d}^{true},\;bin_{d}^{pred}\) denote the structures that belong to this label and the structures that the algorithm ranked in the corresponding bin, respectively. The efficiency of the ranking was measured using the bin accuracy (BAC) defined as [20]  
\[\text{BAC}_{d}=\frac{|bin_{d}^{true}\cap bin_{d}^{pred}|}{|bin_{d}^{true}|}. \tag{6}\]  
Other alternative metrics have also been proposed in the literature. For example, in [36], the authors performed a linear regression to obtain a correlation metric between the observed damage labels and the computed RVS score. However, in the present study, we obtained the ranking directly, without computing a similar score beforehand. Using the metric defined in (6), we computed the bin accuracy for all damage labels and for each individual Seismic Code. First, we computed the accuracy that was obtained using the RVS scores as given by the Codes in their current form. Subsequently, we obtained the accuracy using the fully trained Machine Learning model. Finally, we computed the accuracy obtained using the ML-based recalibrated RVS procedure, as described in Sections 2.5 and 2.6. The results are shown in Tables 3-5 as well as Figure 2, for comparison. It should be reiterated that after undersampling, the dataset contained exactly 100 Red structures (\(|bin_{d}^{true}|=100\)), which is why the corresponding entries in Tables 3-5 have integer values. Comparing the ranking obtained using the established RVS procedures, it can be readily observed that the combination of features with their established weights used in OASP 2000 and 2004 outperformed the other Seismic Codes for this dataset. This improvement in performance was evident for all damage labels. In the label corresponding to collapse (Black), the Codes of New Zealand, FEMA 2002, Canada, and India exhibited slightly lower and comparable performances. It can be observed that, in agreement with the established literature, FEMA 2002 significantly improved over FEMA 1988 in this regard, as the latter exhibited a significantly deteriorated accuracy. Furthermore, it should be noted that a successful ranking should prioritize accuracy in the labels corresponding to \"collapse\" and \"severe damages\" (Black and Red, respectively). These are the worst-case damage categories and the most impactful to society. In this regard, all the examined Seismic Codes were successful. In spite of the fact that some performed better than others, the accuracy of the Black bin was significantly higher, with the exception of the FEMA 1988 case, where it was only slightly higher.