# Multi-Label Classification for Predicting Antimicrobial Resistance on _E. coli_
## 3 Experimentation
### Results and Discussion  
The performance of each of the eleven ML models was evaluated and is shown in Table 2 below. The XGBoost model leads in accuracy, precision, recall, F1-score, and hamming loss, demonstrating a high performance across all primary metrics with a high predictive accuracy of 0.890, and a corresponding F1-score of 0.890. XGBoost also features the lowest hamming loss at 0.110, suggesting fewer misclassified instances relative to the total number of instances, underscoring its robustness in handling the diverse dataset. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Models** & **Accuracy** & **Precision** & **Recall** & **F1-score** & **HAM** \\ \hline DT & 0.849 & 0.850 & 0.849 & 0.849 & 0.151 \\ \hline RF & 0.885 & 0.887 & 0.885 & 0.885 & 0.115 \\ \hline XGBoost & **0.890** & **0.891** & **0.890** & **0.890** & **0.110** \\ \hline CatBoost & 0.878 & 0.882 & 0.878 & 0.878 & 0.122 \\ \hline AdaBoost & 0.871 & 0.872 & 0.871 & 0.871 & 0.129 \\ \hline GBM & 0.883 & 0.884 & 0.883 & 0.883 & 0.117 \\ \hline ETC & 0.886 & 0.888 & 0.886 & 0.886 & 0.114 \\ \hline k-NN & 0.884 & 0.845 & 0.844 & 0.845 & 0.156 \\ \hline SVM & 0.842 & 0.846 & 0.842 & 0.842 & 0.158 \\ \hline LR & 0.875 & 0.875 & 0.875 & 0.874 & 0.125 \\ \hline MNB & 0.587 & 0.629 & 0.587 & 0.565 & 0.413 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance metrics for each ML model based on 10-fold cross-validation on test set. ETC and RF also showed a strong performance, particularly in terms of accuracy and consistency for the values of the evaluation metrics; however, their performance was slightly lower than the performance of XGBoost. The RF model achieves an accuracy of 0.885, with a minimal hamming loss of 0.115, indicating that it is a viable alternative with less complexity than boosting methods. DTs, despite being a simpler model, show commendable recall and F1-scores, both at 0.849, highlighting their effectiveness in capturing a high number of positive instances, though with a relatively higher hamming loss of 0.151. MNB significantly underperforms across all metrics, having the highest hamming loss of 0.413. These findings illustrate the diverse capabilities and trade-offs of the different ML models used in classification. The choice of the model thus depends on the specific requirements of precision, recall, computational efficiency, and the ability to minimize incorrect classifications, as indicated by the hamming loss. The experimental results demonstrate the effectiveness of ML models in predicting antimicrobial resistance in _E coli_. After 10-fold cross-validation on the test set, the XGBoost model exhibited the highest predictive accuracy, precision, recall, F1-score, and hamming loss among the models, with average values of 0.890, 0.891, 0.890, 0.890, and 0.110, respectively. Table 3 compares the performance of the best model using the proposed approach with previous works, further emphasizing the proposed approach's superior performance. From our proposed approach, the XGBoost model exhibits the least hamming loss (0.110), indicating its efficacy in accurately predicting labels. It also achieves the highest precision, highlighting its ability to minimize false positives. The comprehensive evaluation metrics, including accuracy, precision, recall, F1-score, and hamming loss, effectively assess the model's performance. Moreover, the findings from the research support the significance of utilizing ML algorithms to predict antimicrobial resistance, offering valuable insights into addressing the global challenge of increasing antibiotic resistance. In this research, we experimented with eleven ML models to predict antimicrobial resistance in _E. coli_. These models included tree-based models (DT, RF, XGBoost, CatBoost, AdaBoost, GBM, and ETC), a linear-based model (LR), a non-parametric model (k-NN), a kernel-based model (SVM), and a probabilistic model (MNB).