Crop Yield Prediction Using Regression Models: A Comparative Evaluation of Model Performance

Saptak Das, Arijit Sarkar, Soumik Neogi, Suborno NaskararXiv 2026 · arXiv

TL;DR

This study benchmarks five regression models—ranging from simple linear regression to random forests—on a massive dataset of one million agricultural observations to predict crop yield. The results reveal that linear models (LR, Ridge, and Lasso) provide surprisingly robust and competitive baselines with an $R^2$ of ~0.913, while more complex ensemble methods like Random Forest suffer from a significant generalization gap due to overfitting.

What Problem Does This Paper Address?

Predicting crop yield is a cornerstone of modern agricultural planning, affecting everything from food security to resource allocation. However, yield is influenced by a complex web of environmental (rainfall, temperature), biological (crop type, soil), and management (fertilizer, irrigation) factors.

The authors address the challenge of identifying which machine learning architectures are most effective for this high-dimensional regression task. While deep learning often grabs headlines, this paper focuses on establishing rigorous baselines using classical regression techniques, investigating how different data splits and hyperparameter tuning strategies impact model reliability.

Methods

The researchers evaluated five distinct regression algorithms:

  1. Multiple Linear Regression (LR): The standard baseline for linear relationships.
  2. Ridge Regression: A linear model that uses $L_2$ regularization to prevent overfitting by penalizing large coefficients.
  3. Lasso Regression: Uses $L_1$ regularization, which can shrink some coefficients to zero, effectively performing feature selection.
  4. Decision Tree (DT) Regression: A non-linear approach that partitions the feature space.
  5. Random Forest (RF) Regression: An ensemble method that averages multiple decision trees to reduce variance.

The methodology involved a rigorous preprocessing pipeline: removing non-physical negative yield values, one-hot encoding categorical variables, and testing two different feature designs (a 24-feature full set and a 20-feature set that dropped reference categories to avoid linear dependence). They also compared performance across two training-testing splits (80:20 and 70:30) and utilized GridSearchCV and RandomizedSearchCV for hyperparameter optimization.

Datasets

The study utilized a large-scale dataset obtained from Kaggle ("Agriculture Crop Yield" by Samuel Oti Attakorah).

  • Size: Initially 1,000,000 observations, reduced to 999,769 after removing negative target values.
  • Variables: The dataset includes 9 predictors and 1 target variable (Yield_tons_per_hectare).
Table 1: Variables in the supplied raw dataset.

The predictors cover a broad spectrum, including geographic region, soil type, crop category (e.g., Maize, Wheat), and environmental metrics like rainfall and temperature.

Key Insights and Ideas

  • The "Simplicity" Paradox: In an era where complex models are often preferred, the linear models (LR, Ridge, Lasso) performed remarkably well and were nearly indistinguishable from one another. This suggests that for this specific dataset, the relationship between predictors and yield is predominantly linear.
  • The Generalization Gap: Random Forest showed a classic case of overfitting. While it achieved the highest training $R^2$ (~0.987), its test performance dropped significantly (~0.907). This "gap" indicates that the RF model was memorizing noise in the training data rather than learning generalizable patterns.
  • Stability Across Splits: The performance of the linear models remained highly stable regardless of whether an 80:20 or 70:30 split was used, suggesting the dataset is large enough that the specific partition has a minimal impact on the linear baseline.
  • Feature Encoding Impact: The authors noted that the way categorical variables are represented (20 vs 24 features) affects model interpretation and linear dependence, which is a critical consideration for researchers using Ordinary Least Squares (OLS).

Key Results

The quantitative evaluation focused on $R^2$, Mean Squared Error (MSE), and Root Mean Squared Error (RMSE).

  • Linear Models: LR, Ridge, and Lasso all achieved a test $R^2$ of approximately 0.9130 and a test RMSE of 0.5008.
  • Lasso's Edge: Under the 70:30 split, Lasso Regression achieved the lowest test MSE (~0.250770), though the advantage over LR was marginal.
  • Random Forest Overfitting: RF reached a training $R^2$ of 0.987, but its test $R^2$ was only 0.907, the lowest among the tested models.
Table 3: Regression performance for the 80:20 train–test split.
Table 5: Regression performance for the 70:30 train–test split.

Limitations and Future Work

The authors acknowledge that while these results provide a strong baseline, there is room for improvement:

  • Validation Strategy: Future work should move beyond simple splits to repeated train-test splits or k-fold cross-validation to ensure result stability.
  • Advanced Architectures: Exploring boosting methods (like XGBoost or LightGBM) might bridge the gap between the interpretability of linear models and the power of ensembles without the overfitting seen in RF.
  • Feature Importance: A deeper dive into which specific variables (e.g., rainfall vs. fertilizer) contribute most to the prediction would provide more actionable insights for farmers.
  • External Generalization: The models need to be tested on independent datasets from different growing seasons and locales to prove they can handle real-world agricultural variability.

Summary updated

Abstract

Reliable crop-yield prediction can support agricultural planning and resource allocation. This study evaluates five regression models for predicting crop yield from environmental, crop-related, and agricultural management variables. The dataset initially contained 1,000,000 observations and ten variables, with 231 observations having negative target values removed during preprocessing. Categorical variables were represented using one-hot encoding, and Boolean variables were converted into binary values. The models considered were multiple linear regression (LR), random-forest regression (RF), decision-tree regression (DT), ridge regression, and lasso regression. Their performance was evaluated using 80:20 and 70:30 training-testing splits based on the coefficient of determination (R-squared), mean squared error (MSE), and root mean squared error (RMSE). Applying an 80:20 split, LR achieved a test R-squared of approximately 0.9130 and a test RMSE of 0.5008. Applying a 70:30 split, lasso regression yielded the highest test R-squared (approximately 0.9131) and the lowest test RMSE (approximately 0.5008), with performance almost identical to LR and ridge regression. DT also showed improved test performance under the 70:30 split, whereas RF exhibited a substantial gap between training and testing performance. These results indicate that the evaluated linear regression model provides competitive baselines for this dataset. Further experimentation, including validation testing, will help determine the models' performance and predictability.
BibTeX
@misc{das2026crop,
  author = {Saptak Das and Arijit Sarkar and Soumik Neogi and Suborno Naskar},
  title = {{Crop Yield Prediction Using Regression Models: A Comparative Evaluation of Model Performance}},
  year = {2026},
  eprint = {2610.37022},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.37022},
}
Figure