Explainable multi-model predictive modeling of antimicrobial resistance in urinary tract infections

Date
2025
Authors
Nalule, Daphine
Journal Title
Journal ISSN
Volume Title
Publisher
Makerere University
Abstract
Antibiotics are among the most commonly used medications to treat Urinary tract infections (UTIs) globally. Despite their importance, the sustained effectiveness of antibiotics is endangered by the development of resistance. While predictive modeling offers a promising path toward early antimicrobial resistance (AMR) detection, single-strategy learning approaches often struggle to generalize given the complex, nonlinear, and high-dimensional nature of AMR data. To address these limitations, multi-model predictive modeling was explored. This combined both traditional machine learning methods (Support Vector Machines, Random Forest, and XGBoost) and deep learning architectures (Convolutional Neural Network, Long Short-Term Memory, Autoencoders, and hybrid CNN-LSTM and CNN+Decision Tree). Both undersampling (Tomek Links, Edited Nearest Neighbors) and oversampling (Synthetic Minority Over-sampling Technique, Borderline-SMOTE, and Adaptive Synthetic Sampling) approaches were examined to address the severe class imbalance. Oversampling was preferred over undersampling due to its more consistent class distributions across the four target antibiotics: Nitrofurantoin (NIT), Trimethoprim-Sulfamethoxazole (SXT), Ciprofloxacin (CIP), and Levofloxacin (LVX). The baseline XGBoost model proved to be the optimal model. Although the XGBoost model did not outperform other models, it consistently offered the best balance between predictive performance and real-world applicability, particularly in the context of minimizing false predictions. Explainable Artificial Intelligence (XAI) techniques, including SHapley Additive exPlanations (SHAP) and Integrated Gradients, were used to enhance transparency and enable feature-level insights. Results from the XGBoost model using SHAP revealed that prior resistance to the target antibiotic, history of Escherichia infections, and broad antibiotic class exposures were the most influential predictors across all four target antibiotics. In contrast, resistance history within a short time window and specific time-bound prescriptions, such as prior resistance SXT 30, contributed minimally to model predictions. Finally, the optimal model (XGBoost) was deployed as a Flask-based RESTful API containerized with Docker and continuously integrated using GitHub Actions, then hosted on Render. This API was designed to allow CSV-based or real-time predictions and can be integrated into Electronic Medical Record (EMR) systems. This was aimed at helping clinicians identify AMR risk earlier, potentially guiding evidence-based clinical decision making and reducing inappropriate antibiotic use, thus contributing to global efforts to mitigate AMR.
Description
A dissertation submitted to the Directorate of Research and Graduate Training in fulfillment of the requirements for the award of the Degree of Master of Science in Computer Science of Makerere University
Keywords
Citation
Nalule, D. (2025). Explainable multi-model predictive modeling of antimicrobial resistance in urinary tract infections; Unpublished Master dissertation, Makerere University, Kampala