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

Read full text
Authors: Maurice Wanyonyi, Jacqueline Gogo Akelo, Veronicah Nyokabi Njenga, Obwoge Frankline Keraro, Titus Mutua Kioko
Cited by: 1
References: 14

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.

Fields of Study & Subjects

Coffee research and impacts Cocoa and Sweet Potato Agronomy Global trade sustainability and social impact

Publication details

Journal / source
PLOS Climate
Publisher
Public Library of Science (PLoS)
Volume
5
Issue
4
Pages
e0000754–e0000754
Publication date
21 April 2026
Language
EN