Logo Lanfrica

Random Forest Classification for Type 2 Diabetes Risk Prediction in Kenya: Evidence from the 2022 Kenya Demographic and Health Survey

Domaine:

healthcare

Type de record:

paper
Créateur:
Dia
Éditeur:
Sci
Hôte:
Type 2 diabetes mellitus (T2DM) is an escalating public health burden in sub-Saharan Africa, where over half of affected individuals remain undiagnosed at clinical presentation. In Kenya, early risk identification is constrained by limited population-level screening infrastructure and the underutilization of data-driven predictive tools. This study applied a Random Forest (RF) machine learning classifier to the nationally representative 2022 Kenya Demographic and Health Survey (KDHS 2022) dataset to develop and evaluate a predictive model for T2DM risk among Kenyan adults aged 15–54 years. The analytical sample comprised 31,354 respondents drawn from all 47 counties of Kenya, of whom 272 (0.87%) were classified as diabetic, reflecting a severe class imbalance ratio of 114.3:1. Data preprocessing encompassed median imputation for missing values, min-max normalisation of continuous predictors, one-hot encoding of categorical variables, and Recursive Feature Elimination with Cross-Validation (RFECV) for feature selection. The Synthetic Minority Over-sampling Technique (SMOTE) was applied exclusively to the training partition to address class imbalance without contaminating test-set evaluation. The RF model was optimised via exhaustive grid search with five-fold stratified cross-validation, yielding a cross-validation Area Under the Receiver Operating Characteristic Curve (AUC-ROC) of 0.9895 (standard deviation (SD = 0.0004). At a calibrated classification threshold of 0.20, the model achieved a test-set sensitivity of 62.96%, specificity of 69.81%, balanced accuracy of 66.40%, and Matthews Correlation Coefficient (MCC) of 0.0659, correctly identifying 34 of 54 diabetic cases in the held-out test set. SHAP (SHapley Additive exPlanations) analysis identified age, wealth index, hypertension, employment status, and Body Mass Index (BMI) as the dominant predictors of T2DM risk. These findings establish a reproducible, nationally representative RF-based screening framework with direct implications for targeted public health intervention and early detection policy in Kenya.

Similaires