Skip to content
Open access

Machine Learning-Based Crop Yield Forecasting Using Environmental and Agricultural Parameters

Sep 2026 · Interdisciplinary Journal of AI, Machine Learning & Data Science · 0 citations · 5 references

Abstract

Crop yield forecasting is an important component of precision agriculture, as reliable predictions can support agricultural planning, resource allocation, and food-security decisions. However, crop productivity is influenced by several interacting environmental and agricultural factors, making accurate prediction a challenging task. This study develops a machine learning framework for crop yield forecasting by considering rainfall, average temperature, pesticide usage, crop type, geographical area, and year-wise agricultural information. A processed dataset derived from publicly available FAO and World Bank sources was used for the experimental analysis. Seven regression algorithms, namely Linear Regression, Random Forest, Gradient Boosting, XGBoost, K-Nearest Neighbors (KNN), Decision Tree, and Bagging Regressor, were trained and comparatively evaluated. Their performance was assessed using Mean Squared Error (MSE), Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), coefficient of determination (R²), and 5-Fold Cross-Validation. The experimental results show that ensemble-based models provide stronger predictive performance than conventional regression approaches. Among the evaluated models, the Bagging Regressor produced the highest test R² score of 98.59% and a mean cross-validation score of 98.80%, while Random Forest and XGBoost also demonstrated strong predictive performance. The main contribution of this study is a comparative crop yield forecasting framework that combines agricultural and environmental variables with multi-model evaluation, cross-validation, feature-importance analysis, and multiple error metrics. The results demonstrate the potential of ensemble machine learning methods for crop yield estimation and provide a foundation for their future application in data-driven smart agriculture systems.  

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.