Abstract
Background
Understanding the dynamics of HIV testing among adolescent girls and young women (AGYW) is essential for improving HIV testing uptake. This study aimed to leverage supervised machine learning and class balancing techniques to identify the strong predictors of HIV testing among AGYW in Zimbabwe using survey data.
Methods
A secondary data analysis was done to examine the factors associated with HIV testing using a total of 3445 AGYW. Features used included demographic, behavioral and health service factors. Highly correlated features (r > 0.7) were removed and Variance Inflation Factor analysis was used to reduce multicollinearity and redundancy. After pre-processing, five class-balancing techniques that are SMOTE, ROSE, Oversampling, and ADASYN were compared across three baseline algorithms to identify the most effective approach. The best performing technique (ROSE) was then used to balance the dataset and train seven classifiers that is logistic regression, XG boost, k-nearest Neighbors, support vector machines, gradient boosting machine, and neural network. The model performance was evaluated using the metrics: AUC, accuracy, F1 score, sensitivity and specificity and feature importance was assessed to identify key predictors.
Results
The results revealed that 74.9% of AGYW reported ever tested for HIV, with higher testing prevalence among the urban dwellers, those who had worked in the past year, ever married, sexually active, older (20-24years), those who had parental discussion about sex and ever pregnant. ROSE consistently improved model performance, achieving the best metrics across the three algorithms (Mean AUC = 0.938; Mean Accuracy = 0.885; mean F1 = 0.889; Mean sensitivity = 0.925). Among the trained individual models, XGBoost outperformed the other models, with an AUC of 0.960, accuracy of 0.896, and an F1 score of 0.897.
Conclusion
Among the AGYW, HIV testing uptake is influenced mostly by reproductive factors although behavioral factors can also contribute. When dealing with imbalanced datasets, ROSE is the most effective class balancing methods for improving predictive performance. XGBoost can reliably identify individuals most likely to have been tested for HIV. This is important for supporting targeting interventions in resource-limited settings like Zimbabwe.