Skip to content
Open access

A robust machine learning-based engineering solution for crop recommendation in smart agriculture

Aug 2026 · Engineering Research Express · Vol 8, pp. 175218 · 0 citations · 30 references
Physics

TL;DR

This paper treats crop selection as an information-engineering problem and reports an end-to-end decision-support system that couples a rigorously validated classifier to a deployed, explainable field application within a single, reproducible engineering solution.

Abstract

Selecting a crop that matches the soil and climate of a particular field is one of the most consequential decisions a farmer makes, yet it is still guided largely by convention and local experience. This paper treats crop selection as an information-engineering problem and reports an end-to-end decision-support system that couples a rigorously validated classifier to a deployed, explainable field application. Seven supervised algorithms—Gaussian naive bayes, random forest, gradient boosting, decision tree, support vector machine, logistic regression and k-nearest neighbours—were trained on 2 200 records covering 22 crop classes and seven agronomic inputs (N, P, K, temperature, humidity, pH and rainfall). All models were tuned by grid search with an inner five-fold cross-validation confined to the training partition and then compared under repeated stratified ten-fold cross-validation (three repeats, 30 folds), with 95% confidence intervals, paired t-tests with Holm correction and McNemar tests. Random forest achieved the highest mean accuracy, 99.55% (95% CI 99.42–99.67), with the lowest fold-to-fold dispersion (SD 0.34 percentage points); Gaussian naive bayes reached 99.48% (95% CI 99.34–99.63). We report explicitly that this 0.06 percentage-point gap is not statistically significant (paired t-test p = 0.423; McNemar p = 1.000) and therefore make no claim of superiority on accuracy alone; random forest is adopted because it is the most stable model across folds, makes no distributional assumption that the data violate, and supports exact tree-based attribution at deployment. Out-of-fold predictions over all 2200 samples give 99.59% accuracy with only nine errors, seven of which are rice recommended as jute—two crops that share almost identical nutrient profiles and differ mainly in rainfall. Permutation importance, SHapley Additive exPlanations (SHAP) attribution and leave-one-feature-out ablation identify rainfall and humidity as the dominant predictors, and per-recommendation SHAP explanations are surfaced in the deployed application so that a farmer can see why a crop was proposed. The model is served through a cloud-hosted Streamlit web application and a companion Flutter mobile client; the packaged model occupies 2.8 MB and returns a recommendation in about 2 ms on a single core. The contribution of the work lies not in the individual algorithms, which are standard, but in the combination of a transparent and statistically defensible evaluation protocol, model explainability and a documented deployment architecture within a single, reproducible engineering solution.

Read PDF

Similar papers

Open access Oct 2026

Machine Learning for Crop Recommendation and Yield Forecasting: A Practical Framework for Sustainable Agriculture

Agriculture is increasingly influenced by changing weather, soil conditions, water availability, and input costs. Farmers often have to make crop-selection and production decisions with incomplete or delayed information. This paper presents a practical machine-learning framework that connects basic soil and weather obs...

S. V. J. Payal A. Thete, H. B. J. K. D. Jamkar · 0 citations
Conference Sep 2026

Machine Learning-Based Crop Recommendation System Using Soil Analysis Parameters

In Agricultural Census 2024, crop subsector was the largest contributor to Malaysia's agriculture total income. It contributed at RM132.06 billion which comprises 70.8% of the total income. With the huge portion of crops subsector, the transition to precision agriculture is eminent. Part of precision agriculture practi...

Elis Irdina Idris, Nurzeatul Hamimah Abdul Hamid, Azliza Mohd Ali · 0 citations
Review Sep 2026

Smart Farming using Machine Learning: A Review on Recent Trends and Approaches of Crop Yield Prediction

Crop Yield Prediction (CYP) supports the finest decision‐making to support farmers for crop yields forecasting effectively which can help farmers make precise decisions about planting, harvesting, and development of their crops. However, CYP is a challenging endeavor due to the complexity of the underlying mechanisms...

D. Tripathi, S. K. Biswas · 0 citations
Open access 2026

Optimizing Crop Yield Through Data-Driven Decision Making: A Comprehensive Approach to Crop Selection Using Machine Learning

The crop cultivation generally depends on the environmental circumstances and the production of crops plays a major part to meet the increasing requirement of food. Therefore, attaining improved efficiency and sustainability is considered highly essential in farming, due to this reason, a novel Crop Recommendation Syst...

C. Pandi, M. Vedaraj · 0 citations
#explainable ai Open access Sep 2026

An Integrated AI-Based Crop Prediction and Advisory Platform for Precision Agriculture

SmartCrop AI is proposed as a practical digital platform that brings machine-learning based crop and yield prediction, soil-suitability assessment, an AI advisory component, simulated IoT data, mandi-price information and farmer-oriented reporting.

Anurag Gadhave, R. Chaube, Ravina Khadtare et al. · 0 citations
Open access Sep 2026

An Active Learning Ensemble Framework for Tropical Crop Yield Prediction

The proposed system uses a hybrid stacked ensemble regression method, combining XGBoost and Random Forest as base learners and Ridge Regression as the meta-learner, to predict crop yield, and aims to enhance agricultural productivity and decision-making by integrating agricultural, meteorological, and soil data with ad...

Amol Bhilare, Debabrata Swain, Megha B. Patel et al. · 0 citations

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