Predictive modelling of risk factors associated with HIV infection amongst adults in South Africa in 2016 using supervised machine learning

dc.contributor.authorNyahuma, Munyaradzi
dc.contributor.supervisorMusenge, Eustasius
dc.date.accessioned2026-08-07T08:00:57Z
dc.date.issued2025
dc.descriptionA research report submitted in fulfillment of the requirements for the Master of Science , in the Faculty of Health Sciences, School of Public Health, University of the Witwatersrand, Johannesburg, 2025
dc.description.abstractBackground HIV incidence has been declining globally but it remains high in Sub Saharan Africa where 60% of cases in the world originate, with South Africa alone contributing 19% of global HIV population. In this era of artificial intelligence, predicting individuals at risk of HIV is vital for targeted prevention, early intervention and ultimately reducing HIV mortality. We identified the risk factors associated with HIV infection among adults in South Africa in 2016. Method A secondary data analysis was conducted using cross sectional data from the DHS 2016 survey, which included 2726 women and 2136 men in South Africa, to identify risk factors associated with HIV infection. One variable was removed whenever the correlation was >80%. Lasso regression and generalized variance selection were used to identify the best predictors of HIV infection. Systematic descriptive analysis was first conducted. This was followed by sex stratified multilevel logistic regression to control for confounding. Missing data was handled using multiple imputations. Risk factors were then ranked based on model coefficients, and a risk scoring tool was developed. Finally, the stratum specific predictive performance of the models was compared using F1 scores on the test data. Results HIV prevalence was 28.7% in females and 14.9% in males. Common risk factors associated with higher odds of infection in both sexes included older age (females AOR: 2.49; 95% CI: 1.42– 4.38; males AOR: 6.72; 95% CI: 3.39–13.33) and condom use during the last sexual encounter (females AOR: 2.11; 95% CI: 1.54–2.89; males AOR: 2.76; 95% CI: 1.26–6.05). Protective factors included male circumcision (AOR: 0.48; 95% CI: 0.32–0.71). For females, XGB model performed best (F1: 0.82 weighted, 0.77 balanced, 0.72 unweighted data). For males, XGB led on weighted (0.92) and balanced (0.83) data; logistic regression was best on unweighted (0.80). Conclusion vi HIV prevalence was twice as much in females compared to males. Of note is highest prevalence among black women and men, residing in the KwaZulu-Natal (KZN) region. Teen girls also have a higher rate of HIV infection than teen boys. Additionally, women and men who used a condom during their last sexual encounter were more likely to be infected. Circumcision was protective amongst men. XGB was the model with the best predictive performance. Public health efforts should prioritize targeted HIV prevention and treatment strategies for high-burden groups, including Black women and men in KwaZulu-Natal and adolescent girls. Expanding access to youth-centered sexual health education, promoting consistent condom use, and scaling up male circumcision programs could significantly reduce HIV transmission. XGB highlights the potential of machine learning tools to support targeted HIV interventions by early identification of high-risk people.
dc.description.submitterMM2026
dc.facultyFaculty of Health Sciences
dc.identifier.citationNyahuma, Munyaradzi . (2025). Predictive modelling of risk factors associated with HIV infection amongst adults in South Africa in 2016 using supervised machine learning [Master’s dissertation, University of the Witwatersrand, Johannesburg]. WIReDSpace. https://hdl.handle.net/10539/49766
dc.identifier.urihttps://hdl.handle.net/10539/49766
dc.language.isoen
dc.publisherUniversity of the Witwatersrand, Johannesburg
dc.rights© 2025 University of the Witwatersrand, Johannesburg. All rights reserved. The copyright in this work vests in the University of the Witwatersrand, Johannesburg. No part of this work may be reproduced or transmitted in any form or by any means, without the prior written permission of University of the Witwatersrand, Johannesburg.
dc.rights.holderUniversity of the Witwatersrand, Johannesburg
dc.schoolSchool of Public Health
dc.subjectUCTD
dc.subjectPredictive modelling
dc.subjectHIV risk factors
dc.subjectmachine learning
dc.subject.primarysdgSDG-3: Good health and well-being
dc.titlePredictive modelling of risk factors associated with HIV infection amongst adults in South Africa in 2016 using supervised machine learning
dc.typeDissertation

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Nyahuma_Predictive_2025.pdf
Size:
4.37 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
2.43 KB
Format:
Item-specific license agreed upon to submission
Description: