Machine Learning Prediction of Wheat Yield Using Random Forest and Extreme Gradient Boosting Algorithms
Rahul Verma, Amit Singh (India)
Abstract
Background: Wheat (Triticum aestivum L.) is a staple cereal crop serving as a primary food source for over 1.5 billion people globally. Traditional yield prediction methods rely on visual assessment and statistical models with limited accuracy, constraining precision agriculture development and resource optimization.
Objective: To develop and comparatively evaluate Random Forest (RF) and Extreme Gradient Boosting (XGBoost) machine learning algorithms for wheat yield prediction using integrated meteorological, soil, and crop management datasets.
Methods: A dataset comprising 420 observations collected across four growing seasons (2019–2023) from a major wheat-producing region was compiled, including meteorological variables (temperature, rainfall, humidity, solar radiation), soil properties (pH, organic carbon, available macronutrients), crop management practices, and grain yield records. Data were preprocessed, scaled, and split into 80% training and 20% validation subsets. Two ensemble machine learning models—Random Forest and Extreme Gradient Boosting—were developed with hyperparameter tuning via five-fold cross-validation. Model performance was evaluated using coefficient of determination (R²), root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).
Results: XGBoost demonstrated superior predictive accuracy (R² = 0.94, RMSE = 185 kg/ha, MAPE = 6.2%) compared with Random Forest (R² = 0.91, RMSE = 218 kg/ha, MAPE = 8.1%). Feature importance analysis identified rainfall (26.4%), growing season temperature (22.1%), and soil nitrogen content (18.7%) as the most influential predictors. Cross-validation accuracy was 92.8% for XGBoost and 89.4% for Random Forest. Computational efficiency analysis revealed XGBoost required 0.34 seconds per prediction cycle versus 0.52 seconds for Random Forest.
Conclusion: Extreme Gradient Boosting outperformed Random Forest for wheat yield prediction, providing a robust, computationally efficient tool for precision farming decision-support systems. Integration of machine learning yield predictions with remote sensing and IoT platforms offers transformative potential for climate-smart agriculture and resource management optimization.
| DOI | https://doi.org/10.54660/jafi.2023.3.1.21-25 |
| Journal Issue | Vol. 3, No. 1 (2023) |
| Pages | 21-25 |
| Reference Number | 05 |
| Keywords | Wheat yield prediction; Machine learning; Extreme Gradient Boosting (XGBoost); Random Forest |