Skip to content
Review Open access

Environmental and household factors associated with depressive symptoms in rural Kilifi County, Kenya: a machine learning analysis

Sep 2026 · Frontiers in Public Health · Vol 14 · 0 citations · 40 references
Medicine

Abstract

Background Depression is a leading global cause of disability, that disproportionately affects populations in low-resource settings in sub-Saharan Africa, where poverty, limited healthcare, and environmental stressors such as climate variability, poor water and sanitation, and household air pollution compound vulnerability. In Kilifi County, Kenya, recurrent droughts and economic insecurity amplify these challenges, yet the associations between environmental exposures and mental health impacts remain poorly characterized. This study applies machine learning models to examine how climate perceptions, water and sanitation access, and household air pollution proxies are associated with depressive symptoms in Kilifi County. Methodology This cross-sectional study analyzed primary household survey data collected from July to December 2021 within the Kaloleni/Rabai Community Health and Demographic Surveillance System. Structured surveys captured demographics, mental health status via the Patient Health Questionnaire-9 (PHQ-9), and environmental exposures, including climate perceptions, agricultural stressors, water and sanitation access, and air pollution proxies. Depression was defined as PHQ-9 ≥ 10. Thirty-one variables were grouped into environmental perceptions, climate impacts, air pollution proxies, and water/sanitation categories. Random Forest and XGBoost models were trained in Python using 80/20 household-grouped train-test split (GroupShuffleSplit) to prevent data leakage, with 10-fold stratified group cross-validation. Class imbalance was addressed using balanced class weights (Random Forest) and scale_pos_weight (XGBoost). Model performance was assessed using accuracy, balanced accuracy, ROC-AUC, PR-AUC, sensitivity, specificity, precision, recall, F1-scores, and Brier scores with bootstrap 95% confidence intervals. Feature contributions were evaluated using Gini importance, gain and SHAP values. Results Among 17,738 participants (median age 41.0 [IQR 31.0–54.0], 77.8% female), 14.9% (n = 2,635) screened positive for depression (PHQ-9 ≥ 10). XGBoost outperformed Random Forest across all metrics: 0.802 (95% CI: 0.788–0.815) versus 0.796 (95% CI: 0.782–0.808), ROC-AUC 0.845 (95% CI, 0.826–0.862) versus 0.823 (95% CI, 0.804–0.841), balanced accuracy 0.753 versus 0.738, and sensitivity 0.684 versus 0.657. Both models showed moderate precision for depression-positive cases (XGBoost 0.40, Random Forest 0.38) reflecting the precision-sensitivity trade-off inherent in class-imbalance handling. Key predictors across Gini importance, gain and SHAP analyses included drinking water source, heat-related health risks, drought exposure, home thermal discomfort and cooking with open fire highlighting the convergence of water/sanitation, climate, and household air quality factors. Conclusion Environmental and household exposures are consistently associated with depression in rural Kilifi County. Machine learning identified water and sanitation conditions, climate variability perceptions, and household energy practices as leading predictors. Integrating environmental and climate-sensitive indicators into community health workflows, alongside interventions such as clean cookstoves, water access and climate-resilient agriculture, could reduce depression burden and enhance precision public health for climate-vulnerable communities. Longitudinal studies with refined exposure measurement are needed to clarify the temporal and causal nature of these associations.

Read PDF

Similar papers

Review Open access Sep 2026

Household exposure pathways and perceived health risks associated with artisanal and small-scale gold mining around Lake Sonfon, Sierra Leone: a cross-sectional study

Artisanal and small-scale gold mining (ASGM) is widely associated with heavy metal contamination in rural communities, yet limited evidence links multiple household exposure behaviours to self-reported health outcomes, particularly in lake-dependent West African settings. This cross-sectional study assessed househo...

Bundu Conteh, Joseph K. Sang, J. Gathenya et al. · 0 citations
Open access Aug 2026

Food Insecurity as a Moderator of Rural Mental Health: A County-Level Analysis

Objective: To examine if food insecurity moderates the relationship between rurality and mental health outcomes (suicide mortality, poor mental health days, frequent mental distress) and to assess if these effects vary across U.S. Census divisions. Methods: This county-level (n=2,397) cross-sectional study used OLS and...

E. Krishna, N. Shanavas, P. Gavini et al. · 0 citations
Open access Sep 2026

Machine learning based multimodel prediction of poor wellbeing, generalized anxiety disorder, and insomnia among adults in Indian urban informal settlements: toward explainable digital mental health screening

Introduction Mental health morbidity among urban informal settlements-dwelling populations is shaped by a complex interplay of behavioural exposures including screen time, working hours, and sleep duration and sociodemographic vulnerability. Methods We analyzed cross-sectional data from 1,600 adults recruited from 16 c...

Rupeshkumar Deshmukh, Sudhanshu Mahajan, Reva Wani · 0 citations
Open access Aug 2026

Mitigating the Respiratory Health Impacts of Air Pollution on Urban Youth: An Analysis of Policy, Community and Individual Protective Responses

The findings indicate that awareness and personal precautions cannot substitute for source-oriented emission control and an integrated intervention architecture is proposed, combining enforceable urban regulation, school- and community-based risk communication, real-time air-quality information and practical exposure-r...

Hai Binh Nguyen, Minh Chinh Pham · 0 citations
Review Open access Sep 2026

Health Behaviors, Informal Employment, and Depression Among Female Workers in Indonesia’s Geographically Disadvantaged Regions

Introduction: Employment insecurity, chronic illness, and health-risk behaviours may be associated with depressive symptoms among women working in Indonesia's disadvantaged, frontier, and outermost (3T) regions. However, nationally representative survey evidence for this population remains limited. Objective: This stud...

Fatmawaty Mallapiang, Syamsul Alam, Nildawati et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.