A stacking-based machine learning framework for crop production prediction
摘要
Accurate crop‐production forecasting underpins food security and policy in agrarian economies but remains challenging due to nonlinear interactions across climate, soil, crop types, and management. In this work, a novel stacking-based machine learning framework which integrates leakage-safe temporal feature engineering and model explainability is presented for crop yield forecasting in East Asia. Exploiting the availability of FAOSTAT panel data (1961–2019; 9,638 records; 125 variables), Lagged values, rolling/exponentially weighted statistics, growth indicators and Fourier terms are derived and trained a diverse stack of base learners—Random Forest, Gradient Boosting and Logistic Regression—combined by an Extra Trees meta-learner. It is demonstrated via grouped spatio-temporal cross-validation and leave-one-country-out (LOCO) tests and investigates OOD performance against an external dataset. The proposed stack achieves equally high (Acc/Prec/Rec/F1) of 0.97, which is superior to classical ML and deep baselines. LIME investigations reveal that forward-looking persistence characteristics (recent lags, rolling means/variability) drive most of the forecasts, which are in accordance with agronomic expectations. LOCO results suggest near-1:1 low–mid tracking and under-prediction at the extreme high tail, indicative of fixable scale bias; OOD diagnostics stress the importance of unit/transform harmonization and light local recalibration. Significance tests (paired tests) confirm this improvement with small-sample caveats. The pipeline is computationally lightweight and highly transferable outside of East Asia through retraining with region-specific covariates (weather, soils, irrigation) and aggregated CV, providing an interpretable, stable blueprint for operational agricultural forecasting.