Explainable AI for Malaria Diagnosis: Comparative Analysis of ML Models Using Random Forest Feature Selection and SHAP Interpretability
David Kipngetich Chepkonga *
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Amos Kipkorir Langat
Department of Audit, College of Accounting Science, University of South Africa, South Africa.
Ebenezer Esenogho
Department of Audit, College of Accounting Science, University of South Africa, South Africa.
Mohamed Abdirahman Jama
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Collins Otieno Owuor
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Winnie Jepkonga Kulei
Centre for Epidemiological Modelling and Analysis(CEMA), Nairobi, Kenya.
Charles Otieno Ndede
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Erick Munala Sifuna
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Samuel Kipsang Kaptum
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
Fred Junior Onyango
Department of Pure and Applied Mathematics, Jomo Kenyatta University of Agriculture and Technology, Kenya.
John Kamwele Mutinda
School of Management, University of Science and Technology of China, Hefei, China.
Aymar AKILIMALI
Department of research, Medical Research Circle (MedReC), Goma, DR Congo.
*Author to whom correspondence should be addressed.
Abstract
Malaria remains one of the most significant causes of morbidity and mortality in tropical and subtropical regions, and timely diagnosis is essential for effective case management. Microscopy is the traditional parasitological reference standard, while rapid diagnostic tests (RDTs) are widely used, field-deployable alternatives with product- and antigen-dependent sensitivity and specificity; both approaches are constrained by requirements for trained personnel, reagents, or equipment in resource-limited settings. This study develops and evaluates, on a simulated clinical dataset calibrated to published aggregate statistics, an explainable artificial intelligence pipeline for malaria diagnosis prediction from routinely collectable symptoms, vital signs, and haematological indices, using six machine-learning (ML) models: Logistic Regression (LR), Naive Bayes (NB), K-Nearest Neighbours (KNN), Random Forest (RF), Support Vector Classifier (SVC), and Decision Tree (DT). The Synthetic Minority Oversampling Technique (SMOTE) and Random Forest feature selection are embedded within a single leakage-safe pipeline that is refitted in every cross-validation fold. The reported best model is selected on the basis of the cross-validated F1-score rather than held-out test performance, and the test set is used exactly once for confirmatory reporting. Under this design, SVC with RF-selected features was selected (mean cross-validated F1 = 0.740), achieving a test-set accuracy of 0.906 [95% CI 0.852, 0.953], recall of 0.867 [0.667, 1.000], and ROC AUC of 0.959 [0.919, 0.988]. A paired bootstrap test found no statistically significant difference in AUC compared with the runner-up, Logistic Regression (AUC 0.956, p = 0.81). Permutation importance corroborated 8 of the top 10 impurity-based features. Parasite density, the quantity used to determine the parasitological diagnosis, was excluded from the predictor set as a precautionary safeguard against near-total label leakage. Calibration, subgroup recall by age and sex, and a class-weighting comparison are also reported. This framework illustrates, without any claim of clinical validity, how a leakage-safe ML pipeline and SHAP interpretability can be combined and rigorously self-audited; real patient-level data and external validation are required before any clinical inference is drawn.
Keywords: Malaria diagnosis, machine learning, random forest, SHAP, feature selection, explainable artificial intelligence, simulation study, resource-limited settings