An Ensemble Machine Learning Model for Stroke Risk Detection Among Kenyan Adults

dc.contributor.authorMulongo, Jairus Otana
dc.date.accessioned2026-11-27T03:18:17Z
dc.date.issued2026-11-27
dc.descriptionA Master's Thesis submitted in partial fulfilment of the requirements for the Award of the Master of Data Science of the Open University of Kenya. Supervisor: Prof. Irene Wattanga.
dc.description.abstractStroke burden is rising fastest in low- and middle-income countries, yet most risk-detection tools are derived from high-income populations and lack interpretability. This study developed and evaluated ensemble machine learning models for identifying Kenyan adults with a history of stroke, using data from the 2015 Kenya WHO STEPwise Survey for Non-Communicable Disease Risk Factors (STEPS), a national household survey. A quantitative experimental design was applied within the Cross-Industry Standard Process for Data Mining (CRISP-DM). The analytic sample comprised 4,492 adults aged 18 to 69 years, of whom 296 (6.6%) reported a history of stroke. Logistic regression and a decision tree served as baselines, and random forest, gradient boosting, and a stacking ensemble were compared with them. Models were trained on 80% of the data, with synthetic minority oversampling applied to training folds only, and were evaluated on a held-out test set of 899 respondents against a no-skill baseline that classified every respondent as stroke-free (accuracy = .934). No model matched the accuracy of this baseline. Gradient boosting performed best on detection-relevant measures (ROC-AUC = .784, recall = .508, balanced accuracy = .702), whereas the stacking ensemble (ROC-AUC = .755, recall = .203) did not improve on its base learners, and differences in ROC-AUC among the tree-based models were within the fold-to-fold variation of cross-validation. Age, blood pressure, and body mass index ranked highest in global feature importance. The findings demonstrate that a tuned ensemble outperforms its base learners for stroke-risk classification, confirming the study hypothesis; by ranking Kenyan adults using age, BMI, and blood pressure profiles linked to prior cardiovascular events, it can help identify those at elevated stroke risk earlier for timely clinical follow-up. Age, blood pressure, and body mass index were the leading predictors, consistent with prior literature, while self-reported disease history contributed little. The model showed clinically plausible, interpretable feature importance. Ensembling delivered a genuine but conditional benefit, chiefly improved stability rather than the anticipated accuracy gain, motivating future work.
dc.identifier.urihttps://erepository.ouk.ac.ke/handle/123456789/1688
dc.language.isoen
dc.publisherOpen University of Kenya
dc.subjectStroke Detection
dc.subjectEnsemble Machine Learning
dc.subjectRandom Forest
dc.subjectGradient Boosting
dc.subjectStacking
dc.subjectExplainable AI
dc.subjectShap
dc.subjectWho Steps Kenya
dc.titleAn Ensemble Machine Learning Model for Stroke Risk Detection Among Kenyan Adults
dc.typeThesis