Comparative and complementary use of Bayesian inference and supervised learning for predictive modeling of coffee rust incidence among Kenyan smallholder farmers

Hemileia vastatrix , the causal agent of coffee leaf rust, poses a persistent threat to Arabica coffee production in Kenya, where smallholder farmers face recurrent yield losses and limited access to effective control strategies. Effective disease management requires predictive frameworks capable of quantifying both infection risk and associated uncertainty under real-world farm conditions. This study presents a comparative evaluation of Bayesian hierarchical inference and supervised machine learning approaches for predicting coffee rust incidence, using their complementary strengths to generate probabilistic predictions. The models were developed using longitudinal data from 9,850 plot-level observations across six major coffee-producing counties in Kenya. Microclimatic moisture variables, particularly leaf wetness duration and relative humidity, emerged as the dominant predictors of infection. Partial dependence and SHAP analyses revealed strong nonlinear threshold effects: elevated humidity and prolonged leaf wetness sharply increased infection probability, while proximity to infected farms intensified spatial transmission dynamics. A key finding is that parsimonious, interpretable models performed competitively with complex algorithms. Logistic regression achieved the highest discriminative performance (AUC ROC = 0.867), matching or exceeding more complex ensemble methods while maintaining transparency and computational efficiency. Ensemble models such as random forests achieved slightly higher classification accuracy, highlighting complementary strengths across approaches. The Bayesian hierarchical model contributed additional value by quantifying uncertainty and accounting for unobserved heterogeneity across counties. These findings demonstrate that interpretable models can perform as well as complex machine learning algorithms in this context, an important insight for resource-limited agricultural settings. The proposed framework offers a scalable, transparent decision-support tool for precision disease management and enhances the resilience of smallholder coffee systems in Kenya and similar tropical environments.

Authors

Publication Details

Journal
PLOS Climate
Published
2026-04-21
DOI
https://doi.org/10.1371/journal.pclm.0000754
Primary Topic
Coffee research and impacts
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative and complementary use of Bayesian inference and supervised learning for predictive modeling of coffee rust incidence among Kenyan smallholder farmers

Maurice Wanyonyi, Obwoge Frankline Keraro, Titus Mutua Kioko, Jacqueline Gogo Akelo et al.
PLOS Climate
Coffee research and impacts
article

Comparative and complementary use of Bayesian inference and supervised learning for predictive modeling of coffee rust incidence among Kenyan smallholder farmers

Maurice Wanyonyi, Obwoge Frankline Keraro, Titus Mutua Kioko, Jacqueline Gogo Akelo, Veronicah Nyokabi Njenga
article en

Abstract

Hemileia vastatrix , the causal agent of coffee leaf rust, poses a persistent threat to Arabica coffee production in Kenya, where smallholder farmers face recurrent yield losses and limited access to effective control strategies. Effective disease management requires predictive frameworks capable of quantifying both infection risk and associated uncertainty under real-world farm conditions. This study presents a comparative evaluation of Bayesian hierarchical inference and supervised machine learning approaches for predicting coffee rust incidence, using their complementary strengths to generate probabilistic predictions. The models were developed using longitudinal data from 9,850 plot-level observations across six major coffee-producing counties in Kenya. Microclimatic moisture variables, particularly leaf wetness duration and relative humidity, emerged as the dominant predictors of infection. Partial dependence and SHAP analyses revealed strong nonlinear threshold effects: elevated humidity and prolonged leaf wetness sharply increased infection probability, while proximity to infected farms intensified spatial transmission dynamics. A key finding is that parsimonious, interpretable models performed competitively with complex algorithms. Logistic regression achieved the highest discriminative performance (AUC ROC = 0.867), matching or exceeding more complex ensemble methods while maintaining transparency and computational efficiency. Ensemble models such as random forests achieved slightly higher classification accuracy, highlighting complementary strengths across approaches. The Bayesian hierarchical model contributed additional value by quantifying uncertainty and accounting for unobserved heterogeneity across counties. These findings demonstrate that interpretable models can perform as well as complex machine learning algorithms in this context, an important insight for resource-limited agricultural settings. The proposed framework offers a scalable, transparent decision-support tool for precision disease management and enhances the resilience of smallholder coffee systems in Kenya and similar tropical environments.

PLOS ClimateVol. 5(4)
Openalex Percentile: Top 11%
Coffee research and impacts
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.