# A Machine Learning Framework for Assessing Seismic Hazard Safety of Reinforced Concrete Buildings
## 5 Result and Discussion  
The model's certainty to predict the class of the unknown samples correctly defines its efficiency, illustrated by various factors, like confusion matrix, accuracy, recall, and precision. The confusion matrix visualizes the performance of the model by producing numbers of samples predicted correctly and incorrectly. Precision, also known as Positive Predictive Value or PPV, is the fraction of cases when the model identifies the class of the sample correctly. Accuracy is the measure of correctly predicted sample points out of the complete data. Recall or sensitivity is the fraction of cases rightly identified as belonging to the respective class amidst all the samples that correctly fit that class. While evaluating the four datasets, all the four mentioned factors are considered. Figures 5-8 present the confusion matrix and calculated Precision and Recall for each class for datasets of Ecuador, Haiti, Nepal, and South Korea. The (3 \(\times\) 3) or (4 \(\times\) 4) size of the confusion matrix follows the number of classes in the respective datasets. Haiti model in Figure 6 shows the highest accuracy of 68%, and precision of 58%, 91%, and 64% for damage classes 1, 2, and 3, respectively. Class 1 building samples are efficiently classified, i.e., 11 out of 19, while Class 3 samples show a low acceptance, and only 7 out of 17 are predicted accurately. Among all the models, the South Korea model functioned with the least accuracy of 48%. A low number of sample data can be one of the reasons for the model's lower accuracy. Class 1 and Class 3 have the highest and same recall value of 67%; it shows that these classes are correctly recognized, while class 4 is poorly misclassified with a recall value of only 20%. Figure 5: The overall accuracy attained by the classifier for Ecuador is 60%. Class 2 has the maximum correct predictions; wheres class 3 happens to miscategorize significant unseen samples. Figure 6: Haiti classifier scored the highest accuracy of 68%. Class 1 and class 2 samples are predicted correctly; wheres class 3 samples have maximum misclassified predictions. Class 1 has 100% recall value, i.e., no false-positive prediction, and 91% of precision for class 2 shows that the classifier significantly identifies the class samples accurately. Figure 7: With four damage classes, Nepal scored the second-highest accuracy of 67%. Class 3 has maximum true-positive samples with a recall value of 100%. To understand the practicality of balancing the imbalanced data, the study evaluated the model prediction efficiency before and after data manipulation. Table 9 shows the accuracy of each model with the current kernel, achieved prior and later shaping of the imbalanced data. The accuracy of each model improved after balancing the imbalanced data. The highest accuracy of 68% for the Haiti model was only 60% when the data were imbalanced, whereas South Korea only had 43% accuracy, even lesser than 48%. Most results employed RBF kernels. The Receiver Operating Characteristics (ROC) curve is represented by a graphical plot that depicts a binary classifier model's indicative capacity as its bias threshold differs. The \(X\)-axis and \(Y\)-axis of the ROC curve display true positive and false positive, respectively. Therefore, the ROC plot's top left corner acts as an \"ideal\" point--depicting value zero for a false positive rate and a true positive rate. Therefore, the larger the area under the curve (AUC), the better is the classifier performance. The ROC curve's steepness serves an essential part in expanding the true positive rate and reducing the false-positive rate. Since the ROC curve works only in binary classification, a multi-class classification method needs to binarize the output. The curves of different classes generated in ROC are comparable with each other or with a varying threshold. Figures 9-12 illustrates the ROC plots for the test data for Ecuador, Haiti, Nepal, and South Korea models, respectively.