A Modular Agroclimatic Feature Engineering Framework for Country-Level Crop Yield Prediction Using XGBoost and LightGBM

Authors

  • Ledyvia Audiz Coranov Universitas Amikom Yogyakarta, Indonesia
  • Kusnawi Universitas Amikom Yogyakarta, Indonesia
Pages Icon

DOI:

https://doi.org/10.63158/journalisi.v8i4.1762

Keywords:

Agroclimatic feature engineering, Crop yield prediction, LightGBM, XGBoost, Geographic generalization

Abstract

Accurate crop yield prediction is essential for supporting food-security assessment, agricultural planning, and policy-level decision-making. This study proposes a modular agroclimatic feature engineering framework for country-level crop yield prediction using XGBoost and LightGBM. The proposed framework integrates climate indicators, climate–pesticide interactions, temporal descriptors, composite agroclimatic indices, and nonlinear transformations to improve predictive representation while controlling data leakage. Experiments were conducted on 28,151 country–crop–year observations from 98 countries covering 1990–2013. To evaluate temporal and geographic generalization, models were assessed using time-based validation, Random KFold, GroupKFold by country, bootstrap confidence intervals, and held-out-country evaluation. Results show that LightGBM with the S3 feature configuration achieved the best temporal prediction performance, obtaining an R² of 0.9492 and RMSE of 21,257 hg/ha. However, held-out-country evaluation revealed lower transferability, with the best configuration achieving R² of 0.6694, highlighting the challenge of geographic generalization. The findings demonstrate that engineered agroclimatic features can significantly improve country-level crop yield prediction, but model performance depends strongly on the validation setting. This framework provides a reliable benchmark for leakage-controlled agricultural machine learning research rather than direct farm-level operational forecasting.

Downloads

Download data is not yet available.

References

[1] T. van Klompenburg, A. Kassahun, and C. Catal, “Crop yield prediction using machine learning: A systematic literature review,” Comput. Electron. Agric., vol. 177, p. 105709, Oct. 2020, doi: 10.1016/j.compag.2020.105709.

[2] K. S. M. Anbananthen et al., “An intelligent decision support system for crop yield prediction using hybrid machine learning algorithms,” F1000Res., vol. 10, p. 1143, Nov. 2021, doi: 10.12688/f1000research.73009.1.

[3] M. Shahhosseini, G. Hu, I. Huber, and S. V. Archontoulis, “Coupling machine learning and crop modeling improves crop yield prediction in the US Corn Belt,” Sci. Rep., vol. 11, no. 1, p. 1606, Jan. 2021, doi: 10.1038/s41598-020-80820-1.

[4] M. Hasan et al., “Ensemble machine learning-based recommendation system for effective prediction of suitable agricultural crop cultivation,” Front. Plant Sci., vol. 14, Aug. 2023, doi: 10.3389/fpls.2023.1234555.

[5] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA: ACM, Aug. 2016, pp. 785–794. doi: 10.1145/2939672.2939785.

[6] D. Wang, L. Li, and D. Zhao, “Corporate finance risk prediction based on LightGBM,” Inf. Sci., vol. 602, pp. 259–268, Jul. 2022, doi: 10.1016/j.ins.2022.04.058.

[7] C. Bentéjac, A. Csörgő, and G. Martínez-Muñoz, “A comparative analysis of gradient boosting algorithms,” Artif. Intell. Rev., vol. 54, no. 3, pp. 1937–1967, Mar. 2021, doi: 10.1007/s10462-020-09896-5.

[8] Y. Li et al., “A county-level soybean yield prediction framework coupled with XGBoost and multidimensional feature engineering,” Int. J. Appl. Earth Obs. Geoinf., vol. 118, p. 103269, Apr. 2023, doi: 10.1016/j.jag.2023.103269.

[9] S. S. Sajid, M. Shahhosseini, I. Huber, G. Hu, and S. V. Archontoulis, “County-scale crop yield prediction by integrating crop simulation with machine learning models,” Front. Plant Sci., vol. 13, Nov. 2022, doi: 10.3389/fpls.2022.1000224.

[10] S. M. Abdelouahed, R. Abla, E. Asmae, and A. Abdellah, “Harnessing feature engineering to improve machine learning: A review of different data processing techniques,” in 2024 International Conference on Intelligent Systems and Computer Vision (ISCV), IEEE, May 2024, pp. 1–6. doi: 10.1109/ISCV60512.2024.10620105.

[11] A. Morales and F. J. Villalobos, “Using machine learning for crop yield prediction in the past or the future,” Front. Plant Sci., vol. 14, Mar. 2023, doi: 10.3389/fpls.2023.1128388.

[12] “Crop Yield Prediction Dataset.” Accessed: Aug. 01, 2026. [Online]. Available: https://www.kaggle.com/datasets/patelris/crop-yield-prediction-dataset

[13] T. Iizumi and T. Sakai, “The global dataset of historical yields for major crops 1981–2016,” Sci. Data, vol. 7, no. 1, p. 97, Mar. 2020, doi: 10.1038/s41597-020-0433-7.

[14] D. Grogan, S. Frolking, D. Wisser, A. Prusevich, and S. Glidden, “Global gridded crop harvested area, production, yield, and monthly physical area data circa 2015,” Sci. Data, vol. 9, no. 1, p. 15, Jan. 2022, doi: 10.1038/s41597-021-01115-2.

[15] “Trends in CO2 - NOAA Global Monitoring Laboratory.” Accessed: Aug. 01, 2026. [Online]. Available: https://gml.noaa.gov/ccgg/trends/data.html

[16] I. Charalampopoulos, F. Droulia, and I. X. Tsiros, “Projecting Bioclimatic Change over the South-Eastern European Agricultural and Natural Areas via Ultrahigh-Resolution Analysis of the de Martonne Index,” Atmosphere, vol. 14, no. 5, p. 858, May 2023, doi: 10.3390/atmos14050858.

[17] S. Liao et al., “A Modified Shape Model Incorporating Continuous Accumulated Growing Degree Days for Phenology Detection of Early Rice,” Remote Sens., vol. 14, no. 21, p. 5337, Oct. 2022, doi: 10.3390/rs14215337.

[18] V. Aschonitis, D. Touloumidis, M.-C. ten Veldhuis, and M. Coenders-Gerrits, “Correcting Thornthwaite potential evapotranspiration using a global grid of local coefficients to support temperature-based estimations of reference evapotranspiration and aridity indices,” Earth Syst. Sci. Data, vol. 14, no. 1, pp. 163–177, Jan. 2022, doi: 10.5194/essd-14-163-2022.

[19] T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna: A next-generation hyperparameter optimization framework,” in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, New York, NY, USA: ACM, Jul. 2019, pp. 2623–2631. doi: 10.1145/3292500.3330701.

[20] J. Carrasco, S. García, M. M. Rueda, S. Das, and F. Herrera, “Recent trends in the use of statistical tests for comparing swarm and evolutionary computing algorithms: Practical guidelines and a critical review,” Swarm Evol. Comput., vol. 54, p. 100665, May 2020, doi: 10.1016/j.swevo.2020.100665.

[21] S. Herbold, “Autorank: A Python package for automated ranking of classifiers,” J. Open Source Softw., vol. 5, no. 48, p. 2173, Apr. 2020, doi: 10.21105/joss.02173.

[22] J. Liu and Y. Xu, “T-Friedman Test: A New Statistical Test for Multiple Comparison with an Adjustable Conservativeness Measure,” Int. J. Comput. Intell. Syst., vol. 15, no. 1, p. 29, Dec. 2022, doi: 10.1007/s44196-022-00083-8.

[23] S. M. Lundberg et al., “From local explanations to global understanding with explainable AI for trees,” Nat. Mach. Intell., vol. 2, no. 1, pp. 56–67, Jan. 2020, doi: 10.1038/s42256-019-0138-9.

[24] R. Salmerón-Gómez, C. B. García-García, and J. García-Pérez, “A Redefined Variance Inflation Factor: Overcoming the Limitations of the Variance Inflation Factor,” Comput. Econ., vol. 65, no. 1, pp. 337–363, Jan. 2025, doi: 10.1007/s10614-024-10575-8.

[25] S. M. Shawon, F. B. Ema, A. K. Mahi, F. L. Niha, and H. T. Zubair, “Crop yield prediction using machine learning: An extensive and systematic literature review,” Smart Agric. Technol., vol. 10, p. 100718, Mar. 2025, doi: 10.1016/j.atech.2024.100718.

[26] Md. A. Jabed and M. A. Azmi Murad, “Crop yield prediction in agriculture: A comprehensive review of machine learning and deep learning approaches, with insights for future research and sustainability,” Heliyon, vol. 10, no. 24, p. e40836, Dec. 2024, doi: 10.1016/j.heliyon.2024.e40836.

[27] M. A. Razavi et al., “Enhancing crop yield prediction in Senegal using advanced machine learning techniques and synthetic data,” Artif. Intell. Agric., vol. 14, pp. 99–114, Dec. 2024, doi: 10.1016/j.aiia.2024.11.005.

[28] M. von Bloh, D. Lobell, and S. Asseng, “Knowledge informed hybrid machine learning in agricultural yield prediction,” Comput. Electron. Agric., vol. 227, p. 109606, Dec. 2024, doi: 10.1016/j.compag.2024.109606.

[29] Y. Li et al., “Research on Factors Affecting Global Grain Legume Yield Based on Explainable Artificial Intelligence,” Agriculture, vol. 14, no. 3, p. 438, Mar. 2024, doi: 10.3390/agriculture14030438.

[30] S. N. Khan, D. Li, and M. Maimaitijiang, “Using gross primary production data and deep transfer learning for crop yield prediction in the US Corn Belt,” Int. J. Appl. Earth Obs. Geoinf., vol. 131, p. 103965, Jul. 2024, doi: 10.1016/j.jag.2024.103965.

[31] F. Aramburu-Merlos, M. P. van Loon, M. K. van Ittersum, and P. Grassini, “High-resolution global maps of yield potential with local relevance for targeted crop production improvement,” Nat. Food, vol. 5, no. 8, pp. 667–672, Jul. 2024, doi: 10.1038/s43016-024-01029-3.

Downloads

Published

2026-08-29

Issue

Section

Articles

Most read articles by the same author(s)