Machine Learning-Based Early Prediction of Opportunistic Infections Among People Living with HIV
Article Sidebar
Main Article Content
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.
Downloads
References
Ahlström, M. G., Ronit, A., Omland, L., Vedel, S., &Obel, N. (2019). Algorithmic prediction of HIV status using nation-wide electronic registry data. EClinicalMedicine.
Bartl, L., Zeeb, M., Kälin, M., Loosli, T., Notter, J., Furrer, H., & Nemeth, J. (2025). Machine Learning-based Prediction of Active Tuberculosis in People with HIV Using Clinical Data. Clinical Infectious Diseases.
Cai, Q., Yang, L., Ling, Y., Pan, W., Zhong, Q., Wang, C., & Pan, X. (2025). Survival prediction models for people living with HIV based on four machine learning models. Scientific Reports.
Chen, H., Chen, F., Wang, Y., Cai, E., Pan, W., Li, Y., &Su, F. (2025). A Machine Learning Model for Diagnosing Opportunistic Infections in HIV Patients: Broad Applicability Across Infection Types. Journal of Cellular and Molecular Medicine.
Chen, J., Liu, L., Huang, J., Jiang, Y.-J., Yin, C., Zhang, L., & Lu, H. (2024). LSTM-Based Prediction Model for Tuberculosis Among HIV-Infected Patients Using Structured Electronic Medical Records: A Retrospective Machine Learning Study. Journal of Multidisciplinary Healthcare.
Chen, Y., Pan, K., Lu, X., Maimaiti, E., &Wubuli, M. (2025). Machine learning-based prediction of mortality risk in AIDS patients with comorbid common AIDS-related diseases or symptoms. Frontiers in Public Health.
Emegano, D., Duwa, B., Usman, A. G., Ahmad, H., Ozsahin, D., Askar, S. S., & America, A. (2025). A comparative study on TB incidence and HIVTB coinfection using machine learning models on WHO global TB dataset. Scientific Reports.
Gilliland, S., &Mbuagbaw, L. (2025). The Applications of Machine Learning to Prognostic Modeling for Human Immunodeficiency Virus: A Protocol for a Scoping Review. Health Science Reports.
Girma, D., Dejene, H., Geleta, L. A., Tesema, M., &Bati, F. (2022). Time to occurrence, predictors, and patterns of opportunistic infections incidence among HIV-positive patients attending Antiretroviral Therapy Clinic of Salale University Comprehensive Specialized Hospital: A retrospective cohort study. Medicine.
Gruber, S., Krakower, D., Menchaca, J. T., Hsu, K., Hawrusik, R., Maro, J. C., &Klompas, M. (2020). Using electronic health records to identify candidates for human immunodeficiency virus pre‐exposure prophylaxis: An application of super learning to risk prediction when the outcome is rare. Statistics in Medicine.
Henderson, H., Napravnik, S., Kosorok, M., Gower, E. W., Kinlaw, A. C., Aiello, A., & van Duin, D. (2022). Predicting Risk of Multidrug-Resistant Enterobacterales Infections Among People With HIV. Open Forum Infectious Diseases.
Huang, L., Xie, B., Zhang, K., Xu, Y., Su, L., Lv, Y., &Lv, J. (2023). Prediction of the risk of cytopenia in hospitalized HIV/AIDS patients using machine learning methods based on electronic medical records. Frontiers in Public Health.
Ichwan, W. W., Tandra, P. A., Qomariyah, N. N., Meirawan, R. F., &Setiawan, F. (2025). Machine Learning-Based Prediction of Seropositive Toxoplasma Gondii from Lifestyle Factors. International Conferences on Information Science and System.
Ijaiya, M. A., Troncoso, E., Mutloatse, M., Ifeanyi, D., Obasa, B., Emerenini, F., &Curran, K. (2025). Use of machine learning in predicting continuity of HIV treatment in selected Nigerian States. PLOS Global Public Health.
Kurniawan, A., Marthabakti, C., Putri, L. M., Suyono, B. C., &Alisiah, R. A. (2026). Performance Evaluation of Machine Learning Algorithms for AIDS-Infected Patient Classification. JurnalKesehatanVokasional.
Li, L., Shi, C., Liu, X., Li, W., Luo, Y., Zhang, H., & Shen, L. (2025). A diagnostic model for NTM disease in HIV-positive patients: a machine learning-based analysis with novel inflammatory markers. Frontiers in Immunology.
Mamo, D., Yilma, T., Fekadie, M., Sebastian, Y., Bizuayehu, T., Melaku, M., &Walle, A. D. (2023). Machine learning to predict virological failure among HIV patients on antiretroviral therapy in the University of Gondar Comprehensive and Specialized Hospital, in Amhara Region, Ethiopia, 2022. BMC Medical Informatics and Decision Making.
Marcus, J., Hurley, L., Krakower, D., Alexeeff, S. E., Silverberg, M., & Volk, J. E. (2019). Use of electronic health record data and machine learning to identify potential candidates for HIV preexposure prophylaxis: a modelling study. The Lancet HIV.
Masur, H., Brooks, J., Benson, C., Holmes, K., Pau, A., & Kaplan, J. (2014). Prevention and treatment of opportunistic infections in HIV-infected adults and adolescents: Updated Guidelines from the Centers for Disease Control and Prevention, National Institutes of Health, and HIV Medicine Association of the Infectious Diseases Society of America. Clinical Infectious Diseases.
Ngiam, K., & Khor, I. W. (2019). Big data and machine learning algorithms for health-care delivery. The Lancet Oncology.
Orwa, J., Oduor, P., Okelloh, D., Gethi, D., Agaya, J., Okumu, A., &Wandiga, S. (2023). Comparison of logistic regression with regularized machine learning methods for the prediction of tuberculosis disease in people living with HIV: cross-sectional hospital- based study in Kisumu County, Kenya. medRxiv.
Rubaihayo, J., Tumwesigye, N., Konde-Lule, J., &Makumbi, F. (2016). Forecast analysis of any opportunistic infection among HIV positive individuals on antiretroviral therapy in Uganda. BMC Public Health.
Russom, S., Kollias, D., & Zhang, Q. (2025). Proactive HIV Care: AI-Based Comorbidity Prediction from Routine EHR Data. 2025 IEEE/CVF International Conference on Computer Vision Workshops (ICCVW).
Sah, A., Elshaikh, R., Shalabi, M., Abbas, A. M., Prabhakar, P. K., Babker, A. M., &Agarwal, S. (2025). Role of Artificial Intelligence and Personalized Medicine in Enhancing HIV Management and Treatment Outcomes. Life.
Scott, I. (2021). Demystifying machine learning: a primer for physicians. Internal Medicine Journal (Print).
Singh, Y. (2017). Machine Learning to Improve the Effectiveness of ANRS in Predicting HIV Drug Resistance. Healthcare Informatics Research.
Sui, Q., Li, G., Peng, Y., Zhang, J., Zhang, Y., & Zhao, R. (2025). Scalable and robust machine learning framework for HIV classification using clinical and laboratory data. Scientific Reports.
Wu, L., Xia, D., & Xu, K. (2023). Multi-Clinical Factors Combined with an Artificial Intelligence Algorithm Diagnosis Model for HIV-Infected People with Bloodstream Infection. Infection and Drug Resistance.
Xu, X.-H., Ge, Z., Chow, E., Yu, Z., Lee, D. M., Wu, J., & Zhang, L. (2022). A Machine-Learning-Based Risk-Prediction Tool for HIV and Sexually Transmitted Infections Acquisition over the Next 12 Months. Journal of Clinical Medicine.
Yang, X.-D., Su, B., Zhang, X., Liu, Y., Wu, H., & Zhang, T. (2020). Incomplete immune reconstitution in HIV/AIDS patients on antiretroviral therapy: Challenges of immunological non‐responders. Journal of Leukocyte Biology.
Zhan, B., Wei, W., Xie, Z., Meng, S., Bao, X., He, X., & Liang, H. (2024). Machine learning-based prognostic prediction for hospitalized HIV/AIDS patients with cryptococcus infection in Guangxi, China. BMC Infectious Diseases.
Zhou, J., Yang, Y., Xie, Z., Lu, D., Huang, J., Lan, L., & Huang, J. (2023). Dysbiosis of gut microbiota and metabolites during AIDS: implications for CD4+ T cell reduction and immune activation. AIDS (London).

This work is licensed under a Creative Commons Attribution 4.0 International License.
All articles published in our journal are licensed under CC-BY 4.0, which permits authors to retain copyright of their work. This license allows for unrestricted use, sharing, and reproduction of the articles, provided that proper credit is given to the original authors and the source.