Unraveling drivers of maize (Zea mays L.) yield variability in Ghana: A machine learning approach
• Maize grain yield showed high variability with a coefficient of variation of 55%. • Fertilized yields had a 15% lower coefficient of variation than unfertilized yields. • Machine learning models explained 69% of the variability in maize grain yield. • Nitrogen fertilizer (NF) and soil magnesium (Mg) significantly drove maize yield. • NF, soil moisture, and Mg interaction significantly explained maize yield variability. Maize as staple crop is essential for food security in Ghana, yet its yields remain low and highly variable despite increased fertilizer use. Understanding yield variability is crucial for effective agronomic strategies and reducing the risks of inappropriate fertilization strategies. This study quantifies maize yield variability, evaluates predictive model accuracy, and identifies key yield-influencing factors using machine learning (ML) models. A dataset of 5213 maize yield observations from 2000 to 2022 was analyzed using random forest (RF), gradient boosting (GB), and cubist models. Model performance was assessed through nested 20 × 10-fold cross-validation and grid search, using model error, concordance correlation coefficient, model efficiency coefficient (MEC), and mean absolute error. SHapley Additive exPlanations value and H-statistics determined variable importance and first- and second-order effects. Yield coefficient of variation was 55 %, with fertilizer use reducing variability on average by 15 %. ML models demonstrated high predictive accuracy, with RF, GB, and cubist achieving similar mean MCEs of 0.69. All three models identified nitrogen fertilizer (NF) and exchangeable soil magnesium (Mg) as the key drivers of maize yield. NF increased maize yields by an average of 181 kg ha −1 (RF), 287 kg ha −1 (GB), and 293 kg ha −1 (Cubist) across a range of 0–240 kg NF ha −1 . Similarly, Mg contributed to yield increases on average of 161 kg ha −1 (RF), 198 kg ha −1 (GB), and 287 kg ha −1 (cubist) over a range of 0.5–2.4 mEq 100 g −1 . Additionally, interactions between NF, soil moisture, and Mg were found to significantly influence maize yield. Our findings underscore the pivotal role of NF and Mg (a relatively understudied soil nutrient in Ghana) in influencing maize yield. The study advocates for Mg- contain fertilization and highlights the need for further research to deepen Mg impact on maize production in Ghana.
Authors
- G.B.M. Heuvelink (ORCID: https://orcid.org/0000-0003-0959-9358)
- P.S. Bindraban (ORCID: https://orcid.org/0000-0001-5221-8763)
- Anselme K. K. Kouame
Institutions
- International Fertilizer Development Center (US)
- ISRIC - World Soil Information (NL)
- Africa Rice Center (CI)
- Wageningen University & Research (NL)
Publication Details
- Journal
- Computers and Electronics in Agriculture
- Published
- 2025-06-11
- DOI
- https://doi.org/10.1016/j.compag.2025.110647
- Citations
- 4
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 7.00