## 5 Results and Discussion
### Damage Levels Classification Models
The following inferences were drawn from the results of the trained classification models:  
1. The results show that the RF model had the highest accuracy rate, at 92.9%, followed by the NN and AB models. The good performance of the tree-based models suggests that there are non-linear decision boundaries between the failure modes. The results clearly indicate that the non-parametric tree-based models performed better overall than did parametric non-tree-based models like NB. 2. Identifying damage state DS4, which indicates the collapse of the URM building, is critical. The RF model had a precision and recall rate of 96.6% in identifying DS4 in the test set. Similarly, the NN model showed a high recall rate for DS4 and slightly higher precision than the RF model. 3. Compared to other ML models, the RF model had a higher F1 score for all damage states, followed by the NN and AB models. These models also had lower misclassification rates. The F1 score of the DA model for all damage states was comparatively lower than other models, indicating poor performance in classifying the damage states. The AB model had 1.8% lower accuracy and 1.6% lower DS4 recall than the RF model. Based on the results, it can be clearly seen the bagging-based RF model outperforms gradient-based methods like AB in terms of accuracy. 4. Despite having a lower training error, the SVM model was outperformed by the neural network model in terms of accuracy, precision, and recall on the test set. Additionally, the KNN model with zero training error had lower accuracy than the tree-based models. This highlights the importance of splitting the data into training and test sets to evaluate model performance accurately. 5. In Figure 12, the accuracy, F1 score, precision, and recall of the classification models are compared. It is evident that the RF, SVM, and NN models demonstrate higher accuracy levels, ranging from 90% to 100%. Additionally, the F1 score values for these models exceed 75.0% across all damage states. While accurate classification of DS3 and DS4 is crucial, models exhibiting superior performance in classifying all damage states will significantly aid in the post-earthquake risk assessment of URM buildings. Notably, the precision values of the NB, DA, KNN, DT, and SVM models fall below 70% for damage states DS1 and DS3, indicating their poor performance. Furthermore, the recall values also reflect the inferior performance of NB and DA models, with recall values below 70% for the damage state DS3. 6. The results clearly demonstrate the superior performance of RF, AB, and NN models in categorizing the damage states of the URM building. Comparable findings validating the efficacy of these classification models can be found in the existing literature. For instance, the AB model achieved over 80% accuracy in classifying failure modes of reinforced concrete frames with infills [9]. Furthermore, the RF and AB models utilized for the collapse status classification of RC frame buildings exhibited enhanced performance [10]. Similarly, the RF model employed for identifying the flexure-shear failure mode of concrete shear walls attained the highest accuracy, with 70% recall and 84% precision [11]. Based on the higher values for accuracy and recall, the RF model can be seen as suitable for identifying the damage states in the URM building. In order to identify the importance of the input parameters that affect the performance of the RF model, the relative importance of the predictor variables was evaluated, and this is shown in Figure 13. The importance of the predictors was assessed by permuting out-of-bag observations across the trees. In this study, out-of-bag predictor importance values were initially computed through permutation, reflecting the impact of predictor variables on output estimation. The relative importance of each variable was then determined by dividing its importance value by the sum of the importance values for all predictor variables.