Manuscript submitted January 30, 2026; accepted March 5, 2026; published April 28. 2026
Abstract—The outbreak of pests is a severe problem in farming that leads to massive loss of crop varieties
and poses a threat of food insecurity in the global context. Pest risk should be predicted early so that pests
could be intervened in time and crops could be protected in a sustainable manner. The research aims at
forecasting the occurrence of pests through machine learning, namely, XGBoost and a Sequential Neural
Network (SNN). The models were trained using the historical agricultural data, which comprised of crop
type, weather conditions and seasonal factors with the supplementary real-time weather data being
incorporated with the OpenWeather API to provide real-time predictions. The preprocessing of data
consisted of work with missing values, use of SMOTE to balance the classes (in the case of XGBoost) and
scaling of features in the case of the neural network. The measures used to assess model performance were
accuracy, precision, recall, F1-score, and confusion matrix. The findings revealed that the XGBoost model
performed optimally in prediction, which gave good predictions in terms of feature importance where crop
type and seasonality were the most highly important predictors. The Sequential Neural Network also had
similar performance and could provide the complex relations between weather variables and pest
occurrence. This work offers an addition to precision agriculture and helps to make better decisions related
to sustainable pest management as it will include timely and precise predictions without the use of IoT
devices or image data.
keywords—pest outbreak, machine learning, XGBoost, sequential neural network
Cite: Paul Olotu, Olutayo Boyinbode, Eyiowuawi Abdulateef, Temitayo Balogun,"Pest Forecaster: A Web‐Based Machine Learning Framework for Climate‐Sensitive Pest Risk Prediction," Journal of Advances in Artificial Intelligence, vol. 4, no. 2, pp. 94-103, 2026. doi: 10.18178/JAAI.2026.4.2.94-103
Copyright © 2026 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).
Copyright © 2023-2026. Journal of Advances in Artificial Intelligence. Unless otherwise stated.
E-mail: editor@jaai.net