Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

The Application of Machine Learning Algorithms to Predict HIV Testing Using Evidence from the 2002–2017 South African Adult Population-Based Surveys: An HIV Testing Predictive Model

Domain:

healthcare

Record type:

paper
Creator:
MusEdiYegHar
Publisher:
MDP
Host:
There is a significant portion of the South African population with unknown HIV status, which slows down epidemic control despite the progress made in HIV testing. Machine learning (ML) has been effective in identifying individuals at higher risk of HIV infection, for whom testing is strongly recommended. However, there are insufficient predictive models to inform targeted HIV testing interventions in South Africa. By harnessing the power of supervised ML (SML) algorithms, this study aimed to identify the most consistent predictors of HIV testing in repeated adult population-based surveys in South Africa. The study employed four SML algorithms, namely, decision trees, random forest, support vector machines (SVM), and logistic regression, across the five cross-sectional cycles of the South African National HIV Prevalence, Incidence, and Behavior and Communication Survey (SABSSM) datasets. The Human Science Research Council (HSRC) conducted the SABSSM surveys and made the datasets available for this study. Each dataset was split into 80% training and 20% testing sets with a 5-fold cross-validation technique. The random forest outperformed the other models across all five datasets with the highest accuracy (80.98%), precision (81.51%), F1-score (80.30%), area under the curve (AUC) (88.31%), and cross-validation average (79.10%) in the 2002 data. Random forest achieved the highest classification performance across all the dates, especially in the 2017 survey. SVM had a high recall (89.12% in 2005, 86.28% in 2008) but lower precision, leading to a suboptimal F1-score in the initial analysis. We applied a soft margin to the SVM to improve its classification robustness and generalization, but the accuracy and precision were still low in most surveys, increasing the chances of misclassifying individuals who tested for HIV. Logistic regression performed well in terms of accuracy = 72.75, precision = 73.64, and AUC = 81.41 in 2002, and the F1-score = 73.83 in 2017, but its performance was somewhat lower than that of the random forest. Decision trees demonstrated moderate accuracy (73.80% in 2002) but were prone to overfitting. The topmost consistent predictors of HIV testing are knowledge of HIV testing sites, being a female, being a younger adult, having high socioeconomic status, and being well-informed about HIV through digital platforms. Random forest’s ability to analyze complex datasets makes it a valuable tool for informing data-driven policy initiatives, such as raising awareness, engaging the media, improving employment outcomes, enhancing accessibility, and targeting high-risk individuals. By addressing the identified gaps in the existing healthcare framework, South Africa can enhance the efficacy of HIV testing and progress towards achieving the UNAIDS 2030 goal of eradicating AIDS.

Visit

doi.org

Licenses

https://creativecommons.org/licenses/by/4.0/

Similar

The Application of Machine Learning Algorithms to Predict HIV Testing in Repeated Adult Population–Based Surveys in South Africa: Protocol for a Multiwave Cross-Sectional AnalysisUsing HIV self-testing to increase the affordability of community-based HIV testing servicesOptimising the adult HIV testing services screening tool to predict positivity yield in Zimbabwe, 2022Socio-economic Status and Associated Factors in the Uptake of HIV Testing: Findings from the South African Population-based National Household Survey Conducted in 2017HIV Incidence by Male Circumcision Status From the Population-Based HIV Impact Assessment Surveys—Eight Sub-Saharan African Countries, 2015–2017Time trends in socio-economic inequalities in HIV testing: insights from population-based surveys in 16 sub-Saharan African countries

The Application of Machine Learning Algorithms to Predict HIV Testing in Repeated Adult Population–Based Surveys in South Africa: Protocol for a Multiwave Cross-Sectional Analysis

Background HIV testing is the cornerstone of HIV prevention and a pivotal step in real

Using HIV self-testing to increase the affordability of community-based HIV testing services

Objectives: This study estimates the costs of community-based HIV testing services (HT

Optimising the adult HIV testing services screening tool to predict positivity yield in Zimbabwe, 2022

HIV positivity yield declined against increasing testing volumes in Zimbabwe, from 20% (1.65 million

Socio-economic Status and Associated Factors in the Uptake of HIV Testing: Findings from the South African Population-based National Household Survey Conducted in 2017

Abstract Background: Improved understanding of barriers to HIV testing is important for

HIV Incidence by Male Circumcision Status From the Population-Based HIV Impact Assessment Surveys—Eight Sub-Saharan African Countries, 2015–2017

Background: Male circumcision (MC) offers men lifelong partial protection from heteros

Time trends in socio-economic inequalities in HIV testing: insights from population-based surveys in 16 sub-Saharan African countries

Summary Background Overall increase in the