Skip to main content
Have a personal or library account? Click to login
Optimizing Crop Recommendations using Machine Learning: A Comparative Study for Enhanced Yield Prediction Cover

Optimizing Crop Recommendations using Machine Learning: A Comparative Study for Enhanced Yield Prediction

Open Access
|Jun 2026

Figures & Tables

Figure 1.

Logistic function [12]

Figure 2.

SVM [5]

Figure 3.

KNN [3, 5]

Figure 4.

Decision Tree [3]

Figure 5.

Random Forest [3]

Figure 6.

(a). Relationship between Nitrogen Levels and Crop Yield

Figure 6.

(b). Relationship between Potassium Levels and Crop Yield

Figure 6.

(c). Relationship between Phosphorus Levels and Crop Yield

Figure 6.

(d). Relationship between Temperature and Crop Yield

Figure 6.

(e). Relationship between Humidity and Crop Yield

Figure 6.

(f). Relationship between pH and Crop Yield

Figure 6.

(g). Relationship between Rainfall and Crop Yield

Figure 7.

Block Diagram of Crop Recommendation System

Figure 8.

Accuracy Comparison

Figure 9.

(a). Confusion Matrix - Logistic Regression

Figure 9.

(b). Classification Report - Logistic Regression

Figure 10.

(a). Confusion Matrix - Naïve Bayes

Figure 10.

(b). Classification Report - Naïve Bayes

Figure 11.

(a). Confusion Matrix - Support Vector Machine

Figure 11.

(b). Classification Report - Support Vector Machine

Figure 12.

(a). Confusion Matrix - K-Nearest Neighbors

Figure 12.

(b). Classification Report - K-Nearest Neighbors

Figure 13.

(a). Confusion Matrix - Decision Tree

Figure 13.

(b). Classification Report - Decision Tree

Figure 14.

(a). Confusion Matrix - Random Forest

Figure 14.

(b). Classification Report - Random Forest

Before MinMax Scaling

NPKtemperaturehumiditypHrainfall
165617161416.39624392.1815196.625539102.944161
75237791927.54384869.3478637.14394369.408782
8927732527.52185663.1321537.28805745.208411
1041101704825.36059275.0319336.012697116.553145
11790173035.47478347.9723056.27913497.790725

After MinMax Scaling

0.121428570.078571430.0450.217234080.90898980.485322250.29685161
0.264285710.528571430.070.537109650.642579460.565940730.17630752
0.050.485714290.10.536478580.570058020.588352290.08931844
0.721428570.464285710.2150.474462090.7088980.390017470.34576958
0.0.085714290.1250.764684290.393181390.431451850.2783274

Crop Recommendation Techniques ML

AuthorsMethodologyFeaturesAccuracyDatasetAdvantagesLimitations
Srilakshmi A., Madhumitha K., Geetha K[4]SVM decision tree (Hybrid approach), Random ForestTemperature, Humidity, pH, rainfall, labelSVM decision tree (Hybrid approach)- 91.8%.Random Forest - 95%sugarcane, coconut, jute, cotton, papaya, groundnut, maize, graphs, rice, mango, rubber etcPredict crop for any type of fieldSmall dataset
R. Pallavi Reddy, B. Vinitha, K. Rishita, K. Pranavi [2020] [2]Linear Regression ModelN, P, K, and moisture values generate recommendations to improve crop production and estimates the price of the yieldLimited in capturing non-linear patterns, Assumes homoscedasticity and independence of errors
S. Mamatha Jajur, Soumya N. G. [2019] [5]KNN, Decision trees, SVM, CNN and LSTM, ANNs, K-means clusteringSoil Type, pH value, NPK content of the soil, Water holding, Temperature, Average rainfall, Previously Harvested crop-wheat, rice, bajra, maize, jawar,select the optimum crop while keeping a number of variables in mind to boost the output of agriculture, minimise the deterioration of the soil in fields that are under cultivation and use less fertiliser when growing crops.Many algorithms are used
Mr. Santosh Mahagaonkar, Devdatta A. Bondre [2019] [6]Random Forest, Support Vector Machine algorithmcrop, crop yield dataset, Location, soil and crop nutrients, fertilizer datasetssoil classification, RF-86.35% crop yield prediction SVM -99.47%Soybean, Rice, Jowar, Wheat, Sunflower, Cotton, Sugarcane, Tobacco, Onion, Dry Chili, etc.future prediction of crop yieldLow accuracy in soil classification performance heavily depends on parameter tuning and it is memory intensive, particularly for large datasets
D. Anantha Reddy, Bhagyashri Dadore, Aarti Watekar [2019] [7]Naïve Bayes, K-NEAREST NEIGHBOUR, RANDOM FOREST, CHAIDDepth, Texture, pH, Soil Colour, Permeability, Drainage, Water holding and Erosion-groundnut, pulses, cotton, vegetables, paddy, sugarcane, coriander.Assist farmers in planting the appropriate seed according to the needs of the soil in order to boost output.The Naïve Bayes algorithm pretends feature independence, which might not be true when dealing with real-world data., CHAID - Limited to categorical target variables and predictors, making it less versatile for handling continuous data
Nidhi H. Kulkarni [8] 2018Linear SVM algorithms, Random Forest, Naïve BayesSoil type, pH soil, NPK, average rainfall, porosity of soil, sowing season temperature99.91%Cotton, Sugarcane, Rice, WheatCrop productivity has improved exponentially for rice, wheat, cotton, and sugarcane.restricted to a fairly small number of crops
Zeel Doshi [3] 2018Neural Network Random Forest, Decision Tree, KNNTemperature rainfall, Location, soil condition91%Jute, sesame, soybean, sugarcane, tobacco, sunflower seeds, ragi, potato, tur, grapeseed, and mustard, bajra, maize wheat, rice gram, barley, cotton, groundnut, and pulsesNeural Networks have the highest accuracy percentage.predict the crop using the harvest from the previous cycle. Crop supply and demand are not considered
Rohit Kumar Rajak [9] 2017Random Tree, NB-classifier, ANN, SVMdepth, pH, texture, permeability to store water, color ofthe soil, and drainage from erosion-vegetables, rice, sugarcane, sorghum, coriander, bananas, legumes, and groundnutsboosts agricultural productivitylarger dataset for model training
S. Pudumalar [10] 2016Random Tree, Naïve Bayes, KNN, CHAID,Depth, pH, texture, waterholding permeability, Soil color, erosion drainage,88%millet, pulses, groundnut, cotton, banana, vegetables, paddy, sugarcane, sorghum, corianderBoost productivitylarger dataset for model training
Rakesh Kumar [11] 2015CSM, Gradient Boosted Decision Tree, and Greedy Forestsoil type, weather, crop type, water density, ratoi, toria, wheat, potato, sarso, linseed, masoor, khesari, onion, sugarcane, Kanda, mung, til, pumpkin, nenua, ladies’ finger, rice, soybean, sweet potato, toor, vegetable seed, and so onoffers a method to select crops while taking into account the yield forecast rate influenced by various factors.Adopting a prediction technique that performs well and has greater accuracy is necessary

Accuracy of ML Models

ModelsAccuracy
Logistic Regression0.9636
Naïve Bayes0.9954
SupportVector Machine0.9681
K-Nearest Neighbors0.9590
Decision Tree0.9818
Random Forest0.9931

Crop Label and Corresponding Numerical Representation

labelCrop_num
Rice1
Maize2
Jute3
Cotton4
Coconut5
Papaya6
Orange7
Apple8
Muskmelon9
Watermelon10
Grapes11
Mango12
Banana13
Pomegranate14
Lentil15
Blackgram16
Mungbean17
Mothbeans18
Pigeonpeas19
Kidneybeans20
Chickpea21
Coffee22
DOI: https://doi.org/10.14313/jamris-2026-021 | Journal eISSN: 2080-2145 | Journal ISSN: 1897-8649
Language: English
Page range: 71 - 84
Submitted on: Jul 21, 2024
Accepted on: Sep 17, 2024
Published on: Jun 24, 2026
In partnership with: Paradigm Publishing Services
Publication frequency: 4 issues per year

© 2026 Sanket Gupta, Trishna Panse, Kailash Chandra Bandhu, Ratnesh Litoriya, Shivani Patnaha, Divya Kumawat, Lishika Pargi, Tisha Modi, published by Łukasiewicz Research Network – Industrial Research Institute for Automation and Measurements PIAP
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.