Source-linked AI summary
Forecasting Corn Yield with Machine Learning Ensembles
Mohsen Shahhosseini, Guiping Hu, Sotirios V. Archontoulis
TL;DR
Earlier within-season corn-yield forecasting has not been thoroughly investigated, despite its importance for crop management and food production monitoring. This paper evaluates blocked-sequential machine-learning ensembles across weather-knowledge scenarios and geographic scales, finding that ensembles outperform base learners and useful forecasts can be made by June 1st.
Problem
Earlier in-season corn-yield forecasting remains insufficiently investigated, although yield predictions support crop management, economic trading, food production monitoring, and food security.
Method
The study develops machine-learning and ensemble models using blocked sequential procedures and out-of-bag predictions to forecast corn yields across three geographic scales and complete or partial weather-information scenarios.
Results
Ensemble models outperform base learners; the optimized weighted and average ensembles achieve RRMSE of 9.5%, while partial-weather results show ample forecasts can be made as early as June 1st.
Takeaways & Limitations
The proposed framework also quantifies feature effects and indicates that pre-planting conditions and weather features from May 1st to June 1st are important for yield prediction.
Takeaways & Limitations
The study reports that stacked ensemble models suffer from the data’s non-IID nature, and blocked sequential procedures did not improve their predictions.
Abstract
from arXiv · showhide
The emerge of new technologies to synthesize and analyze big data with high-performance computing, has increased our capacity to more accurately predict crop yields. Recent research has shown that Machine learning (ML) can provide reasonable predictions, faster, and with higher flexibility compared to simulation crop modeling. The earlier the prediction during the growing season the better, but this has not been thoroughly investigated as previous studies considered all data available to predict yields. This paper provides a machine learning based framework to forecast corn yields in three US Corn Belt states (Illinois, Indiana, and Iowa) considering complete and partial in-season weather knowledge. Several ensemble models are designed using blocked sequential procedure to generate out-of-bag predictions. The forecasts are made in county-level scale and aggregated for agricultural district, and state level scales. Results show that ensemble models based on weighted average of the base learners outperform individual models. Specifically, the proposed ensemble model could achieve best prediction accuracy (RRMSE of 7.8%) and least mean bias error (-6.06 bu/acre) compared to other developed models. Comparing our proposed model forecasts with the literature demonstrates the superiority of forecasts made by our proposed ensemble model. Results from the scenario of having partial in-season weather knowledge reveal that decent yield forecasts can be made as early as June 1st. To find the marginal effect of each input feature on the forecasts made by the proposed ensemble model, a methodology is suggested that is the basis for finding feature importance for the ensemble model. The findings suggest that weather features corresponding to weather in weeks 18-24 (May 1st to June 1st) are the most important input features.
INTRODUCTION
The paper addresses the need for earlier, realistic corn-yield forecasts using partial in-season data and examines prediction across spatial scales. It develops machine-learning ensembles for three major US Corn Belt states and evaluates their accuracy, feature effects, and practical forecasting potential.
- Previous forecasting studies used all available data, whereas this study examines partial in-season weather information to better reflect real forecasting conditions.
- Machine-learning ensembles can reduce bias and variance relative to individual models when their base learners are sufficiently diverse.
- The study forecasts corn yields in Illinois, Indiana, and Iowa, which together produce nearly 50% of US corn and have substantial economic value.
- Several machine-learning and ensemble models use blocked sequential procedures to generate out-of-bag predictions and evaluate forecasts at county, agricultural-district, and state scales.
- The study compares state-level forecasts with USDA NASS forecasts and investigates how complete versus partial in-season weather knowledge affects performance.
- A partial-dependency methodology estimates the marginal effect and importance of input features in the optimized weighted ensemble.
MATERIALS AND METHODS
The framework uses environmental and management data to forecast corn yields under complete and partial weather-information scenarios. Forecasts are produced at county, agricultural-district, and state scales.
- The models use environmental soil and weather variables together with management variables for corn-yield forecasting.
- Forecasting is evaluated with complete in-season weather knowledge and partial knowledge available through August 1st.
- The framework generates forecasts at county, agricultural-district, and state levels.
- The inputs include agronomically relevant data at multiple resolutions, including soil data at 5 km and weather data at 1 km resolution.
Data Set
The dataset combines county-level yield observations with management, weather, and soil features for 293 counties across Illinois, Indiana, and Iowa. It contains 5,342 observations and 597 input features, but excludes genotype information.
- Management variables include plant population and weekly cumulative planting progress.
- Weather inputs include weekly aggregates of seven features, including minimum and maximum temperature, precipitation, radiation, vapor pressure, snow water equivalent, and day length.
- Soil inputs include organic matter, texture, pH, bulk density, water-retention properties, and hydraulic conductivity across soil layers.
- The dataset contains 5,342 annual average corn-yield observations for 293 counties across three US Corn Belt states.
- The input set includes 597 features spanning environmental and management variables.
- Genotype effects are not included because no publicly available genotype dataset was available.
Data Pre-Processing
Pre-processing reserves the latest years for testing, scales inputs, adds features for yield trends, and reduces redundancy to limit overfitting. Trend features represent location-specific and state-level temporal patterns using training data.
- The 2016–2018 observations were reserved for testing, while earlier data were used to build the models.
- All input variables were scaled to the range 0–1, and random-forest feature selection was used to reduce overfitting.
- Observed corn yields increased over time, with reported location-specific increases ranging from 32 to 189 kg/ha/year.
- Because the dataset could not separate the contributions of temperature, precipitation, plant density, genetics, planting technology, and management, these factors were treated as one factor.
- A location-specific linear regression of yield on year creates the yield_trend feature, fitted using training data and predicted for test years.
- The yield_avg feature represents each state's average yield by year using training data, with unseen test observations based on the 2015 training year and average increments.
- Highly correlated feature pairs with Pearson correlation above 0.9 were reduced to one feature, while constructed yearly-trend features were retained.
Hyperparameter Tuning and Model Selection
The study uses time-series-aware validation and Bayesian optimization to tune models while avoiding future information in forecasting. Feature selection reduces the high-dimensional input set before modeling.
- Validation Strategy: Time-series cross-validation is needed because IID k-fold validation does not emulate the test distribution for dependent observations.The authors use a walk-forward variation with equal-sized training portions to reduce computational time.
- Feature Selection: Three-stage feature selection decreases the number of input features from 597 to 72.The procedure is designed to retain independent variables containing the most useful information.
- Hyperparameter Optimization: Bayesian optimization searches hyperparameters using surrogate models and prior information, aiming to improve efficiency over exhaustive or random search.The method updates its approximation with new observations and balances information gathering during the search.
Analyzed Models
The analysis compares diverse individual learners with stacked, averaged, exponentially weighted, and optimized weighted ensembles. Blocked sequential out-of-bag predictions support ensemble training without relying on IID assumptions.
- Base Learners: The base learners include linear regression, LASSO regression, XGBoost, LightGBM, and random forest to provide prediction diversity.Random forest tends toward lower bias and higher variance, whereas gradient boosting combines weak learners sequentially.
- Base Learners: Linear regression models quantitative responses from multiple predictors under linearity, normality, no multicollinearity, and homoscedasticity assumptions.Its coefficients are estimated by minimizing a loss function.
- Base Learners: LASSO adds an L1 penalty that shrinks coefficients toward zero and can exclude variables by setting coefficients to zero.The shrinkage parameter must be determined before learning.
- Stacked Ensembles: Stacked generalization learns from base-model outputs using a second-level model, with four variants using linear regression, LASSO, random forest, or LightGBM.The procedure generates out-of-bag predictions through sequential training and validation blocks.
- Out-of-Bag Predictions: Blocked sequential validation trains on the first eight years, validates on the following year, then advances the training and validation windows one year at a time.The resulting out-of-bag prediction matrix excludes the first eight training years from validation.
- Weighted Ensembles: The optimized weighted ensemble minimizes out-of-bag mean squared error by assigning weights to base-model predictions through nonlinear convex optimization.The approach uses out-of-bag predictions as an emulator of unseen test observations and does not require IID data.
- Weighted Ensembles: The average ensemble assigns equal weights to base learners, whereas the exponentially weighted average uses each learner’s past out-of-bag error to determine weights.Both methods combine predictions from multiple learners, but only the exponentially weighted method bases weights on past errors.
Statistical Performance Metrics
Performance is assessed with error, bias, and directional metrics that capture different aspects of forecast quality. Lower RRMSE is preferred, while MDA evaluates whether predicted movements follow actual movements.
- Error Metrics: RMSE is the square root of the average squared deviation between predictions and actual values.The calculation uses actual values, predictions, and the number of data points.
- Error Metrics: Relative root mean squared error normalizes RMSE by the mean actual value and is commonly reported as a percentage.Lower RRMSE values indicate preferred performance.
- Bias Metric: Mean bias error measures the average bias in predictions.It complements error magnitude metrics by describing systematic prediction bias.
- Directional Metric: Mean directional accuracy measures the probability that forecasts identify the correct direction of a time series.It compares the signs of actual and predicted changes relative to the preceding time point.
RESULTS AND DISCUSSION
The study examines how in-season weather information and feature-level effects shape corn-yield forecast quality. It compares forecasts across weather-information subsets and proposes partial-dependency methods to identify influential inputs.
- The analysis compares ensemble forecast accuracy under different subsets of in-season weather information.
- The study proposes partial-dependency analysis to quantify how input features affect optimized weighted ensemble forecasts.
- The proposed feature-importance method ranks inputs using variation in their partial-dependency plots.
Numerical Results
Ensemble models generally outperform individual learners, with weighted ensembles performing especially well across county, district, state, and future-year evaluations. Their advantage is also compared with prior studies and linked to exploiting diversity among base learners.
- Random forest has the lowest base-model RMSE and RRMSE, while linear regression and LASSO are the only base learners that overestimate yields.
- Ensemble models outperform base learners; optimized weighted and average ensembles achieve county-level RRMSE of 9.5%.This improves the best base learner, random forest, by about 8%.
- Weighted ensembles outperform base learners and stacked ensembles, while stacked regression reaches 60% MDA versus 57% for the optimized weighted ensemble in the 2018 comparison.
- Weighted ensemble models are more accurate for test years 2016–2018 and exploit base-learner diversity better than stacked ensembles.Across models, 2017 has the least error and 2016 the highest prediction error.
- Compared with prior studies, the proposed model's future-year test error is distinguished from cross-validation out-of-bag errors that may be unsuitable for non-IID yield data.The cited prior RRMSE values are 16.7%, 13.4%, and 7.9%.
- At agricultural-district and state scales, optimized weighted and average ensembles, along with stacked LightGBM, outpace base learners and other ensembles.County-level yields are aggregated using harvested-area-weighted averages.
- Figure 4 uses X–Y plots with color intensity representing point accumulation; optimized weighted and average ensembles lie closer to the diagonal.
- Figure 5 shows model performance for test observations from different years.
Partial Knowledge of In-Season Weather Information
The study evaluates corn-yield forecasts with weather information available only through different dates during the growing season. Weighted ensemble models produce decent forecasts as early as June 1st, while partial-dependence analysis identifies influential weather effects.
- Decent corn-yield forecasts can be made from weighted ensemble models as early as June 1st.Forecasts become more accurate when more recent weather data are included.
- The optimized weighted ensemble’s partial-dependence estimates are weighted averages of the base learners’ estimates using the same optimal weights.
- Higher water vapor pressure in week 22 and precipitation in weeks 21 and 41 are associated with lower predicted corn yields.
- Higher minimum temperature in week 19 and shortwave radiation in week 29 are associated with higher predicted yields.
Feature Importance
The paper estimates feature importance for an optimized weighted ensemble using variation in partial-dependence values. Yield-trend features rank highest, while weather from weeks 18–24 is more important than weather from other periods.
- The proposed feature-importance method is intended to interpret input influence in complex ensemble models.The paper motivates the method because ensembles and deep neural networks are harder to interpret than models with natural importance measures.
- Feature importance is measured by the sample standard deviation of each feature’s partial-dependence values.Predictors with higher sample standard deviation are considered more important.
- Yield_trend and yield_avg are the most important input features identified by the optimized weighted ensemble.
- Weather in weeks 18–24, from May 1st to June 1st, is more important than weather in other periods of the year.
- The framework can support future expansion with additional states and inputs such as forecasted weather and county-level N-fertilization data.The authors state that these additions may result in higher prediction accuracy.
CONCLUSION
The study develops a machine-learning framework for corn-yield forecasting across weather-information scenarios and geographic scales. Its optimized weighted ensemble forecasts early yields effectively, while stacked ensembles perform unfavorably with non-IID data.
- The framework uses weather, soil, plant-population, and planting-date data to forecast corn yields across county, agricultural-district, and state levels.
- Several ensembles use blocked sequential procedures to generate out-of-bag predictions under complete and partial weather knowledge.Partial weather scenarios include information through June 1st, July 1st, August 1st, September 1st, and October 1st.
- Weighted average ensembles lead the developed machine-learning models, and stacked ensembles perform unfavorably because of the data set’s non-IID nature.
- Ample corn-yield forecasts can be made as early as June 1st with partial in-season weather information.