Predictive modeling for crop suitability and productivity using machine learning techniques
Abstract
With the increasing global population and rising food demand, improving agricultural productivity through data-driven decision support systems has become essential. This study proposes a cross-validated meta-stacking ensemble framework for multi-class crop suitability prediction using soil nutrient and environmental parameters. The dataset consists of 2,200 samples covering 22 crop types and seven predictor variables, including nitrogen (N), phosphorus (P), potassium (K), temperature, humidity, pH, and rainfall. Six machine learning (ML) models—random forest (RF), decision tree (DT), light gradient boosting machine (LightGBM), extreme gradient boosting (XGBoost), support vector classifier (SVC), and k-nearest neighbors (KNN)—were trained and optimized using RandomizedSearchCV with k-fold cross-validation. A stacked ensemble model was then developed to combine heterogeneous learners and improve predictive robustness. Experimental results demonstrate that the RF model achieved an accuracy of 99.36%, while the proposed cross-validated meta-stacking ensemble achieved comparable performance with improved generalization stability. Precision, recall, and F1-score values of 0.99 indicate consistent classification across all crop classes. Feature importance analysis revealed N, K, and rainfall as the most influential predictors. Model robustness was evaluated using cross-validation and an independent test split to minimize overfitting risk. The findings highlight the effectiveness of ensemble learning for sustainable recommendation systems.
Keywords
Decision tree; Extreme gradient boosting; Light gradient boosting machine; Random forest; Support vector classification
Full Text:
PDFDOI: http://doi.org/10.11591/ijai.v15.i3.pp2533-2542
Refbacks
- There are currently no refbacks.
Copyright (c) 2026 Gulaganjihalli Ningegowda Shwetha, Bhat Geetalaxmi Jairam

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
IAES International Journal of Artificial Intelligence (IJ-AI)
ISSN/e-ISSN 2089-4872/2252-8938
This journal is published by the Institute of Advanced Engineering and Science (IAES).