Machine Learning-Based Early Prediction of Opportunistic Infections Among People Living with HIV
Abstract
The early prediction of opportunistic infections (OIs) among people living with HIV (PLWH). Despite the widespread use of antiretroviral therapy (ART), opportunistic infections remain a major cause of morbidity and mortality, particularly in low- and middle-income settings. Early identification of individuals at high risk is therefore essential for improving clinical outcomes and optimizing healthcare resource allocation. comprehensive dataset comprising 3,982 patient records and 88 clinical, demographic, laboratory, and treatment-related features was utilized. The dataset included categorical, numerical, and text-based variables capturing diverse aspects of patient health status. Principal Component Analysis (PCA) was applied for dimensionality reduction, identifying key contributing factors such as current weight, age, ART refill patterns, and engagement in enhanced adherence counseling sessions. Several machine learning algorithms were explored, with XGBoost emerging as the best-performing model. The model achieved an accuracy of 97.17%, with an AUC of 0.994 and an Average Precision score of 0.979, demonstrating strong discriminative ability. Evaluation metrics further confirmed sensitivity and specificity, with minimal false negatives, which is critical for clinical safety in HIV care.The proposed framework demonstrates the potential of machine learning to support early risk stratification and clinical decision-making for opportunistic infections in HIV-positive populations.