Skip to main content
BMJ Health & Care Informatics logoLink to BMJ Health & Care Informatics
. 2025 Aug 22;32(1):e101419. doi: 10.1136/bmjhci-2024-101419

Development and validation of a predictive model for new HIV infection screening among persons 15 years and above in primary healthcare settings in Kenya: a study protocol

Amos Otieno Olwendo 1,✉, Gideon Kikuvi 2, Simon Karanja 2
PMCID: PMC12374640  PMID: 40846507

Abstract

Introduction

This study seeks to determine incidence, comorbidities and drivers for new HIV infections to develop, test and validate a risk prediction model for screening for new cases of HIV.

Methods and analysis

The study has two components: a cross-sectional study to develop the prediction model using the HIV dataset from the Kenya AIDS and STI Control Programme and a 15-month prospective study for the validation of the model. Inferential analysis will be conducted using algorithms that perform best in disease prediction: Extreme Gradient Boosting (XGBoost) and Multilayer Perceptron. Model sensitivity and specificity will be examined using the receiver operating characteristic curve, and performance will be evaluated using metrics: accuracy, precision, recall and F1 score.

Ethics and dissemination

The study obtained ethical approval (JKU/ISERC/02321/1421) from the Jomo Kenyatta University of Agriculture and Technology Ethical and Research Board and a research licence (NACOSTI/P/24/414749) from the National Commission for Science, Technology and Innovation.

Keywords: Machine Learning; Decision Support Systems, Clinical; Medical Informatics; Public Health; Infectious Disease Medicine


WHAT IS ALREADY KNOWN ON THIS TOPIC

  • Existing HIV risk-scoring functions are developed using historical data with a myriad of quality challenges.

WHAT THIS STUDY ADDS

  • This study proposes a cross-sectional study to develop the risk-scoring function and a prospective study for the validation of the model considering data quality, performance and generalisability of the model.

HOW THIS STUDY MIGHT AFFECT RESEARCH, PRACTICE OR POLICY

  • This study aims to identify gaps in HIV screening and health systems to inform targeted interventions.

Introduction

HIV remains one of the most life-threatening infectious diseases worldwide.1 A recent report by WHO shows that 85.6 million people have been infected with HIV globally. Sub-saharan Africa bears the greatest burden of HIV, with a prevalence of 25.6 million people living with HIV. In Kenya, 1.4 million people are reported to be infected with HIV, and 13 000 adults aged 15 years and above were newly infected with HIV during the year 2023.2

Screening for HIV cases is an effective method for the identification of new HIV infections.3 Community-based screening, despite the associated cost, is the most effective method for the identification of new infections of HIV. Universal screening, which involves subjecting all persons seeking primary healthcare services, seems to be a possible alternative to community-based screening.4 However, HIV testing faces challenges such as inadequate personnel and resource limitations.5 6

HIV incidence stands at about 8.5% and 13% for males and females, respectively. Predictors for new HIV infection include level of education, economic capability, use of alcohol, age when a person first had sex, gender and relationship to the head of the family.7 Also, the presence of morbidities such as oral candidiasis, lymphadenopathy and persistent fever is more common among cases of new HIV infections.8

A recent review9 identified a few studies that attempted to develop HIV risk-scoring functions using retrospective study designs. One10 compared the performance of eight machine learning algorithms, and results had limitations such as a small sample size comprised of imbalanced classes. Also,7 11 utilised large secondary datasets (87 000 and 83 000, respectively) characterised by a high degree of missing data12 and model performance was inconclusive due to the fact that the dataset was self-reported.

This study seeks to determine the incidence, comorbidities and drivers for new HIV infections among persons 15 years and above attending outpatient clinics at selected hospitals in Kenya and develop, test and validate a risk-scoring function for screening for new HIV infections. Even though this study uses a retrospective dataset for the development of the ML model, we are planning to ensure that the dataset used in this study is both representative and of good quality. Unbalanced data results in skewed over-fitted models that are ungeneralisable, thus resulting in high recall. Therefore, our study aims to bridge these gaps in order to develop a predictive model for HIV screening that enhances performance while minimising low recall.

Methods and analysis

Study design

The first component of this study is a cross-sectional study for the development of a risk prediction model using the HIV dataset from the Kenya AIDS and STI Control Programme (NASCOP). The second component is a 15-month prospective study comprised of 1308 participants who meet the inclusion criteria for the validation of the predictive model.

Study population

Development study

The study population for the development of the HIV risk prediction model is comprised of records of patients who had sought HIV services in Kenya.

Validation study

The study population for the validation study will include all persons attending outpatient clinics at selected County Referral hospitals in Kenya. Study participants will be required to provide information such as social demographics, social and family health history.2

Eligibility criteria

The sampled records will be balanced to ensure that male and female clients aged 15 years and above with no more than 10% missing information are sufficiently represented.

Inclusion criteria for the validation study are as follows:

  1. Participant must be 15 years of age and above.

  2. Participants must be able to communicate in English or Kiswahili.

  3. Participants must have been a resident of the respective county for the past 12 months

  4. Verbal assent from adolescents aged 15–17 years old.

  5. Informed written consent from adult participants and caregivers to adolescents.

Exclusion criteria for the validation study are as follows:

  1. Do not give consent to the study.

  2. Previous use of antiretroviral therapy.

  3. Previous use of pre-exposure prophylaxis or post-exposure prophylaxis services.

  4. Inability to participate in the interview because of sickness or cognitive impairment.

Sample size calculation

Development study

The appropriate sample size will be determined considering the desired level of precision, confidence and variability. Therefore, this study will consider all the 88 284 records in the HIV dataset of clients 15 years of age and above.

Validation study

Considering the prevalence of HIV in Kenya, a sample size of 1308 participants will be gathered from 10 counties: Kisumu, Nairobi, Homabay, Siaya, Migori, Nakuru, Mombasa, Kakamega, Kiambu and Kisii, which contribute 57% of new HIV infections in Kenya.2

Sampling technique

A stratified sampling of male and female participants will be considered to ensure that the dataset is sufficiently balanced. For the development study, the dataset will be split as 80% for training the prediction function and 20% for testing the trained model.

Data collection

Development study

Data for the development of the risk prediction model have been obtained from NASCOP after making a formal request. The data have been shared in three comma-separated value files.

Validation study

Study participants will be subjected to a 10-min interview by research assistants using interviewer-administered questionnaire. The prospective validation study flow diagram is as shown in figure 1.

Figure 1. The prospective validation study flow diagram.

Figure 1

Data pre-processing

Electronic medical records are commonly characterised by incompleteness and the presence of noise.13 Consequently, data entry errors, missing values and outliers will be handled appropriately. Thereafter, data will be subjected to rescaling using z-score normalisation.14

Data analysis

Descriptive analysis to determine measures of central tendency, dispersion and frequency tables. Feature selection, which supports the reduction of the number of input variables to features that are most useful to the model using the Sequence Forward Selection (SFS).15 SFS is a bottom-up search strategy that begins with an empty set and gradually adds features one after another while optimising each addition to improve the targeted metrics.16 Thereafter, inferential analysis will be conducted using two methods: Extreme Gradient Boosting (XGBoost), a tree-based ensemble Machine Learning (ML) algorithm and a Multilayer Perceptron, a type of Artificial Neural Network algorithms that perform best in disease prediction models13 with an expectation of achieving high sensitivity and minimised recall. The sensitivity and specificity will be determined with the use of receiver operating characteristic curve, which is the curve obtained by plotting the likelihood of a true positive result against the probability of a false positive result. The performance of the model will also be evaluated using metrics such as accuracy, precision, recall and F1 score.17

Pathways to impact

The output of this study will be used in the identification of potential new cases for HIV in primary healthcare, thus reducing costs that come with the universal screening of HIV. The results from this study will be submitted for publication in a peer-reviewed journal.

Acknowledgements

We appreciate Dr K. Muthoka for support during the process of acquiring data from NASCOP.

Footnotes

Funding: The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

Patient consent for publication: Not applicable.

Provenance and peer review: Not commissioned; externally peer reviewed.

Ethics approval: The study obtained ethical approval (JKU/ISERC/02321/1421) from the Jomo Kenyatta University of Agriculture and Technology Ethical and Research Board and a research licence (NACOSTI/P/24/414749) from the National Commission for Science, Technology and Innovation.

References

  • 1.Wood BR. Core concepts - acute and recent HIV infection - screening and diagnosis - national HIV curriculum. [13-Sep-2024]. https://www.hiv.uw.edu/go/screening-diagnosis/acute-recent-early-hiv/core-concept/all Available. Accessed.
  • 2.UNAIDS Kenya | unaids. [15-Sep-2024]. https://www.unaids.org/en/regionscountries/countries/kenya Available. Accessed.
  • 3.Antelman G, Gill MM, Jahanpour O, et al. Balancing HIV testing efficiency with HIV case-identification among children and adolescents (2–19 years) using an HIV risk screening approach in Tanzania. PLoS ONE. 2021;16:e0251247. doi: 10.1371/journal.pone.0251247. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Leon N, Lewin S, Mathews C. Implementing a provider-initiated testing and counselling (PITC) intervention in Cape town, South Africa: a process evaluation using the normalisation process model. Implement Sci. 2013;8:97. doi: 10.1186/1748-5908-8-97. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Simms V, Dauya E, Dakshina S, et al. Community burden of undiagnosed HIV infection among adolescents in Zimbabwe following primary healthcare-based provider-initiated HIV testing and counselling: A cross-sectional survey. PLoS Med. 2017;14:e1002360. doi: 10.1371/journal.pmed.1002360. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Ahme N, et al. Costs of HIV testing services in sub-Saharan Africa: a systematic literature review. BMC Infect Dis. 2022;22:1–21. doi: 10.1186/S12879-024-09770-7/TABLES/4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Mutai CK, McSharry PE, Ngaruye I, et al. Use of machine learning techniques to identify HIV predictors for screening in sub-Saharan Africa. BMC Med Res Methodol. 2021;21:1–11. doi: 10.1186/S12874-021-01346-2/TABLES/3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Yumo HA, Ajeh RA, Beissner M, et al. Effectiveness of symptom-based diagnostic HIV testing versus targeted and blanket provider-initiated testing and counseling among children and adolescents in Cameroon. PLoS ONE. 2019;14:e0214251. doi: 10.1371/journal.pone.0214251. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Jaiteh M, Phalane E, Shiferaw YA, et al. Utilization of Machine Learning Algorithms for the Strengthening of HIV Testing: A Systematic Review. Algorithms. 2024;17:362. doi: 10.3390/A17080362/S1. [DOI] [Google Scholar]
  • 10.Alie MS, Negesse Y. Machine learning prediction of adolescent HIV testing services in Ethiopia. Front Public Health. 2024;12:1341279. doi: 10.3389/FPUBH.2024.1341279/BIBTEX. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Belete DM, Huchaiah MD, Belete DM, et al. A deep learning approaches for modeling and predicting of hiv test results using edhs dataset. 2023.
  • 12.Emmanuel T, Maupong T, Mpoeleng D, et al. A survey on missing data in machine learning. J Big Data. 2021;8:140. doi: 10.1186/s40537-021-00516-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Olwendo AO, Ochieng G, Rucha K. Comparison of machine learning methods for the prediction of type 2 diabetes in primary care setting using EHR data. J agric sci technol. 2024;23:24–36. doi: 10.4314/jagst.v23i1.3. [DOI] [Google Scholar]
  • 14.Olwendo AO, Ochieng G, Rucha K. Prevalence and Complications Associated with Diabetes Mellitus at the Nairobi Hospital, Nairobi City County, Kenya. J Health Inform Afr. 2021;7:47–57. doi: 10.12856/JHIA-2020-v7-i2-290. [DOI] [Google Scholar]
  • 15.Morani K, Ayana EK, Engin SN. Developement of prediction in clients’ consent to a bank term deposit using feature selection. 2018 6th International Conference on Control Engineering & Information Technology (CEIT); Istanbul, Turkey. 2019. Available. [Google Scholar]
  • 16.Rowlands A, Ameyaw E, Rutagarama F, et al. Insights from the WHO and National Lists of Essential Medicines: Focus on Pediatric Diabetes Care in Africa. Horm Res Paediatr. 2018;90:82–92. doi: 10.1159/000490467. [DOI] [PubMed] [Google Scholar]
  • 17.Olwendo AO, Shahmoradi L, Agin K. Probabilistic model for chronic obstructive pulmonary disease diagnosis and phenotyping using bayesian network. Environment and Water Resource Management / 837; Gaborone, Botswana. 2016. pp. 218–24. [DOI] [Google Scholar]

Articles from BMJ Health & Care Informatics are provided here courtesy of BMJ Publishing Group

RESOURCES