Predicting households risks of waterborne diseases in flood-affected areas using machine learning: A study of Noakhali and Feni, Bangladesh
Abstract
Waterborne diseases remain a major public health challenge, especially in low- and middle-income countries like Bangladesh. This study aimed to identify household level predictors of waterborne diseases and develop an optimized, explainable machine learning framework for predicting disease risk in flood-affected communities. This cross-sectional study was conducted in two flood-affected districts in Bangladesh, using face-to-face interviews with 501 respondents selected through simple random sampling to collect household-level data. Following data preprocessing, correlation analysis, variance inflation factor assessment, mutual information analysis, and Recursive Feature Elimination with Cross-Validation (RFECV) were performed for feature selection. Five machine learning algorithms—Logistic Regression (LR), Random Forest (RF), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Extreme Gradient Boosting (XGBoost) were optimized using randomized hyperparameter tuning with five-fold cross-validation. Model performance was evaluated on an independent test set using accuracy, precision, recall, specificity, F1-score, receiver operating characteristic area under the curve (ROC-AUC), bootstrap confidence intervals, and SHAP-based interpretation. The prevalence of waterborne disease in the flood affected area was found to be 63.7% ( n = 3 1 9 ). RFECV retained ten important predictors: age, gender, monthly household income, household size, flood frequency, flood severity, source of drinking water, availability of medical assistance, water purification method, and community preparedness for preventing waterborne diseases. Among the optimized machine learning models, the Random Forest classifier showed the most balanced predictive performance on the independent test set, achieving an accuracy of 61.4%, precision of 71.9%, recall of 64.1%, specificity of 56.8%, F1-score of 67.8%, and ROC-AUC of 0.643. SHAP analysis identified flood severity, community preparedness, water purification practices, and socio-economic factors as the most influential predictors. Although stacking and weighted soft voting ensemble models were additionally evaluated, neither outperformed the Random Forest. The proposed explainable framework may support targeted interventions and early warning strategies after external validation. All the analyses were conducted using Python.