Predicting global cereal and legume crop yields under climate change using ensemble machine learning
Climate change threatensfood security through rising temperatures, precipitation variability, and elevated CO₂ levels, directly affecting the yields of wheat, maize, rice, and soybean. This study applied ensemble machine learning to a harmonized dataset of 3,420 simulations from 202 studies across 91 countries, using climate and adaptation variables after removing metadata and leakage-prone variables. Eleven algorithms were evaluated using five-fold cross-validation. Random Forest achieved the highest predictive accuracy (CV R² = 0.871 ± 0.027), substantially outperforming linear baselines (R² ≈ 0.20) and neural network approaches (R² = 0.385). Permutation importance confirmed precipitation and temperature as the dominant climate predictors. Scenario-stratified evaluation revealed a systematic decline in accuracy with increasing emission severity, from R² = 0.974 under the low-emission Representative Concentration Pathway (RCP2.6) to R² = 0.892 under the high-emission pathway (RCP 8.5). Rice demonstrated the greatest yield resilience across scenarios, while soybeans showed the highest vulnerability. Fertilizer applications and optimized planting dates produced statistically significant yield improvements ( p < 0.001). However, group-aware validation (GroupKFold by study and by country) revealed substantially weaker predictive performance for unseen studies and unseen countries than the near-perfect fit implied by the random-split results, indicating that strong performance on the random-split test is not sufficient evidence of the models’ ability to generalize beyond their respective studies. Results demonstrate that ensemble machine learning is a practical and viable approach for climate-resilient agriculture decision support, but it is not yet widely applicable to all climate conditions and needs to be further tested by appropriate independent datasets.
Authors
- Sunil Gupta (ORCID: https://orcid.org/0000-0003-3862-1980)
- Sonali Vyas (ORCID: https://orcid.org/0000-0003-2348-3394)
- N.N. Pathak (ORCID: https://orcid.org/0009-0008-9001-6482)
- Adnène Arbi (ORCID: https://orcid.org/0000-0002-2834-0248)
- Shashikant Rai (ORCID: https://orcid.org/0000-0002-1781-9181)
Institutions
- University of Carthage (TN)
- Indian Institute of Information Technology Allahabad (IN)
- Jadara University (JO)
- Tunisia Polytechnic School (TN)
- COER University (IN)
- JK Lakshmipat University (IN)
Publication Details
- Journal
- Discover Artificial Intelligence
- Published
- 2026-12-01
- DOI
- https://doi.org/10.1007/s44163-026-02810-y
- Primary Topic
- Climate change impacts on agriculture
- Type
- article
- Field-Weighted Citation Impact
- 0.00