0% found this document useful (0 votes)
325 views5 pages

Crop - Recommendation - System 2023

This document describes a proposed crop recommendation system using machine learning models. The system aims to help farmers select crops best suited to their land environment by predicting crop growth based on soil nutrients, pH, humidity, and rainfall factors. Several machine learning algorithms are tested, including Decision Tree, Support Vector Machine, Logistic Regression, and Gaussian Naive Bayes. The system seeks to analyze crop suitability for 22 crops in India using a dataset containing nitrogen, phosphorus, potassium, pH, humidity, temperature, and rainfall values. The goal is to evaluate the accuracy of different machine learning approaches for optimal crop recommendations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
325 views5 pages

Crop - Recommendation - System 2023

This document describes a proposed crop recommendation system using machine learning models. The system aims to help farmers select crops best suited to their land environment by predicting crop growth based on soil nutrients, pH, humidity, and rainfall factors. Several machine learning algorithms are tested, including Decision Tree, Support Vector Machine, Logistic Regression, and Gaussian Naive Bayes. The system seeks to analyze crop suitability for 22 crops in India using a dataset containing nitrogen, phosphorus, potassium, pH, humidity, temperature, and rainfall values. The goal is to evaluate the accuracy of different machine learning approaches for optimal crop recommendations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Crop Recommendation System using Machine

Learning
Maaz Patel
Anagha Rane Vansh Patni
Department of Computer Science
Department of Computer Science Department of Computer Science
Engineering
Engineering Engineering
Devang Patel Institute of Advance
Devang Patel Institute of Advance Devang Patel Institute of Advance
Technology and Research
Technology and Research Technology and Research
Charotar University of Science
Charotar University of Science Charotar University of Science
and Technology (CHARUSAT)
and Technology (CHARUSAT) and Technology (CHARUSAT)
Anand, India
Anand, India Anand, India
[email protected]
[email protected] [email protected]

Abstract— Approximately 17% of India's GDP derives


Precision agriculture focuses on identifying these
from the agricultural sector, which even employs more
parameters in an area-specific way to identify issues. Not all
than 60% of the country's workforce. This field has seen
the results given by precision agriculture are accurate to
some changes with new technologies like vertical
result but in agriculture, it is significant to have accurate
farming and so on. However, many Indian farmers still
and precise recommendations because in case of errors it
follow traditional ways and beliefs to use their land. For
may lead to heavy material and capital loss. Many research
example, they wait for the weather to match their farming
works are being carried out, to attain an accurate and more
practices, rather than adjusting to the weather changes.
efficient model for crop prediction [11].
Our research goal is to help farmers pick the best crops
for their situation and environment by predicting which Machine Learning focuses on the algorithm like supervised,
crops fit well with the factors that influence crop growth, unsupervised, and Reinforcement learning and each of them
such as soil nutrients, soil pH, humidity and rainfall. We has its advantages and disadvantages. Supervised learning the
use different machine learning models, such as Decision algorithm assembles a mathematical model from a set of
Tree (DT), Support Vector Machine (SVM), Logistic data that contains both the inputs and the desired outputs.
Regression (LR), and Gaussian Naïve Bayes (GNB). An unsupervised learning-the algorithm constructs a
mathematical model from a set of data that contains only
Keywords— Crop suggestion, Nitrogen-Phosphorus- inputs and no desired output labels. Semi-supervised learning-
Potassium (NPK), Humidity, Rainfall, pH, Machine algorithms expand mathematical models from incomplete
Learning (ML), Decision Tree (DT), Support Vector training data, where a portion of the sample input doesn't
Machine (SVM), Logistic Regression (LR), and have labels [8].
Gaussian Naïve Bayes (GNB). This paper aims to recommend the most suitable crop based
Abbreviations— Decision Tree (DT), Gaussian Naïve on input parameters like Nitrogen (N), Phosphorous (P),
Bayes (GNB), Support Vector Machine (SVM), Logistic Potassium (K), PH value of soil, Humidity, Temperature,
Regression (LR) and Rainfall. This paper predicts the accuracy of the future
production of twenty two different crops such as rice,
maize, chickpea, kidney beans, pigeon peas, moth beans,
mungbean, black gram, lentil, pomegranate, banana, mango,
I. INTRODUCTION grapes, watermelon, muskmelon, apple, orange, papaya,
Agriculture is a significant area for the Indian economy coconut, cotton, jute, and coffee crops using various
and human survival. It is one of the primary occupations supervised machine learning approaches in of India and
which is essential for human life. It likewise contributes a recommends the most suitable crop. The dataset contains
huge part to our day-to-day life [1]. In most cases, Farmers various parameters like Nitrogen (N), Phosphorous (P),
commit suicide due to production loss because they are not Potassium (K), PH value of soil, Humidity, Temperature,
able to pay the bank loans taking for farming purposes[12]. and Rainfall. This proposed system applied different kinds
We have noticed in present times that the climate is of Machine Learning algorithms like Decision Tree (DT),
changing persistently which is harmful to the crops and Support Vector Machine (SVM), Logistic Regression (LR),
leading farmers towards debts and suicide [18]. These risks and Gaussian Naïve Bayes (GNB).
can be minimized when various mathematical or statistical
methods are applied to data and by using these methods, we
can recommend the best crop to the farmer for his II. RELATED WORK
Agricultural land so that it helps him to get maximum profit
[12]. [1] Kumar, Y. Jeevan Nagendra, V. Spandana, V. S.
Vaishnavi, K. Neha, and V. G. R. R. Devi. “Supervised
In India today, agriculture has made significant Machine learning Approach for Crop Yield Prediction in
advancements. Precision farming's secret weapon is "area- Agriculture Sector”. In this proposed system crop yield
specific" cultivation. Although improvements have been prediction can be done from the past historical data which
made, there are still some problems with precision cultivation. includes factors such as temperature, humidity, ph, rainfall,
Crop recommendations are significantly influenced by crop name. Under this system, maximum types of crops will
precision agriculture. Crop recommendations are be covered across different districts of India. By applied this
determined by a variety of factors.
proposed system, we can predicted best crop according to Random Forest and Neural Network and performed multi-
the field weather conditions. This crop prediction can be label classification on it. This proposed system achieved
done by random forest algorithm and decision tree. By 71% accuracy by using rainfall predictor model and
applying random forest algorithm got best accurate value achieved 91.00% accuracy by applying neural network
result. More accuracy results gave more profit to the crop algorithm on crop suitable predictor system.
yield.
[18] Dighe, Deepti, Harshada Joshi, Aishwarya Katkar, Sneha
[9] Suresh, G., A. Senthil Kumar, S. Lekashri, and R. Patil, and Shrikant Kokate. "Survey of Crop Recommendation
Manikandan. “Efficient Crop Yield Recommendation System Systems”. This proposed system developed a crop
Using Machine Learning For Digital Farming”. This proposed recommendation system for smart farming. In this research
system is used to identify particular crop according to given paper reviewed various machine learning algorithms like
particular data. By applying Support Vector Machine CHAID, KNN, K-means, Decision Tree, Neural Network,
(SVM) acquired higher precision and productivity. This Naïve Bayes, C4.5, LAD, IBK and SVM algorithms. For
research paper mainly worked on two datasets: sample this research used Hadoop framework for the intensive
dataset of location data and sample dataset of crop data. By calculations and also helped to get better accuracy for the
using this proposed system recommended particular crop system.
according to their Nutrients (N, P, K, and PH) values and
also identified available Nutrients values and required [21] Kulkarni, Nidhi H., G. N. Srinivasan, B. M. Sagar, and
fertilizers quantities for the particular crop like Rice, Maize, N. K. Cauvery. “Improving Crop Productivity Through A
Black gram, Carrot and Radish. Crop Recommendation System Using Ensembling
Technique”. This proposed system is used for recommended
[10] Reddy, D. Anantha, Bhagyashri Dadore, and Aarti the right crop based on the soil specific type and
Watekar. “Crop recommendation system to maximize crop characteristics like average rainfall and the surface
yield in ramtek region using machine learning”. This proposed temperature with high accuracy. This proposed system
system worked on three parameters: soil characteristics, soil worked on various machine learning algorithms like
types and crop yield data collection based on these Random Forest, Naive Bayes, and Linear SVM. This crop
parameters suggesting the farmer suitable crop to be recommendation system classified the input soil dataset into
cultivated. This proposed system worked on different the recommendable crop type, Kharif and Rabi. By applying
machine learning algorithms like random forest, CHAID, K- this proposed system achieved 99.91% accuracy result.
Nearest Neighbour and Naïve Bayes. By applied this
proposed system we can predict particular crop under
particular weather condition, state and district values. Thus
our proposed work would help farmers in sowing the right III. PROPOSED SYSTEM
seed based on soil requirements to increase productivity of
the nation.
[14] Rajak, Rohit Kumar, Ankit Pawar, Mitalee Pendke, Pooja
Shinde, Suresh Rathod, and Avinash Devare. “Crop
recommendation system to maximize crop yield using
machine learning technique”. This proposed method is used
for identifying particular crop based on soil database. This
proposed system worked on various crops like groundnut,
pulses, cotton, vegetables, banana, paddy, sorghum,
sugarcane, coriander and various attributes like Depth, Fig 1: Block Diagram of Overall Methodology of Proposed System
Texture, Ph, Soil Color, Permeability, Drainage, Water
holding and Erosion. This proposed system worked on various
machine learning classifier like support vector machine In our framework, we have proposed a procedure that is
(SVM) classifier, ANN classifier, Random Forest and Naïve separated into various stages as appeared in Figure 1.
Bayes for recommend a crop for site specific parameter
with accuracy and efficiency. This research work would The five phases are as per the following:
help farmers to increase productivity in agriculture, prevent 1) Collection of Datasets
soil degradation in cultivated land, and reduce chemical use 2) Pre-processing (Noise Removal)
in crop production and efficient use of water resources.
3) Feature Extraction
[15] Doshi, Zeel, Subhash Nadkarni, Rashi Agrawal, and 4) Applied Machine Learning Algorithm
Neepa Shah. “AgroConsultant: Intelligent Crop 5) Recommendation System
Recommendation System Using Machine Learning 6) Recommended Crop
Algorithms”. In this research paper, developed an intelligent
system called AgroConsultant. This proposed system can be
divided into two sub-systems: i) crop suitable predictor ii) Flow of the Proposed System
Rainfall Predictor. This proposed system are worked on five As demonstrated in the figure, the methodology to
major (bajra, jowar, maize, rice and wheat) and fifteen
extract the sentiment contains the several steps that are
minor (barley, cotton, groundnut, gram, jute, other pulses,
described below:
potato, ragi, tur, rapeseed and mustard, sesame, soybean,
sugarcane, sunflower, tobacco) crops and some attributes
like Soil Type, Aquifer thickness, Soil PH, Thickness of
topsoil, Precipitation, Temperature, Location parameters. In
this proposed system Implemented different machine
learning algorithms like Decision Tree, K Nearest Neighbor
(K-NN),
(1) Data Collection: We have applied Decision tree approach in our model as:
(i) Importing library DecisionTreeClassifier from
The dataset [27] consists of parameters like Nitrogen sklearn.tree Class
(N), Phosphorous (P), Potassium (K), PH value of soil, (ii) Now we create DecisionTree Classifier object
Humidity, Temperature and Rainfall. The datasets have (iii) In the last we fit our data
been obtained from the Kaggle website. The data set has
2200 instance or data that have taken from the past historic
B. Support Vector Machine (SVM):
data. This dataset include twenty two different crops such as
rice, maize, chickpea, kidneybeans, pigeonpeas, mothbeans,
Support Vector Machine (SVM) is a supervised
mungbean, blackgram, lentil, pomegranate, banana, mango,
machine learning algorithm or model which can be utilized
grapes, watermelon, muskmelon, apple, orange, papaya,
for classification and as well as for regression challenges.
coconut, cotton, jute, and coffee.
However, we mainly use it in classification challenges.
SVM is generally represented as training data points in space
The dataset is separated in Train and Test sets in which 80% which is divided into groups by intelligible gap which is as
of the whole dataset is taken as Train and 20% as Test dataset. far as possible [22]. In SVM algorithm, each data item is
plotted as a point in n-dimensional space with each feature
Dataset - Link:
value being the value of a specific coordinate. Then the
https://www.kaggle.com/datasets/atharvaingle/crop- classification is performed by finding the hyper-plane
recommendation-dataset differentiating the two classes very well [19].

(2) Pre-Processing (Noise Removal): C. Logistic Regression (LR)

For the successful application pre-processing is required. The Logistic Regression model is a broadly used
The data which is acquired from different resources are statistical model that, in its basic form, uses a logistic function
sometime in raw form. It may contain some incomplete, to model a binary dependent variable; many more complex
redundant, inconsistent data. Therefore in this step such extensions exist. In Regression Examination, Logistic
redundant data should be filtered. Data should be regression is predicting the parameters of a logistic model; it
normalized [5]. We also use Power BI to remove is a form of Binomial regression [22].
peak/downfall, local min-max, outliers, and junk values.
D. Gaussian Naïve Bayes (GNB)
(3) Feature Extraction:
Gaussian Naive Bayes (GNB) is a classification technique
This step is focus on identifying and using most relevant used in Machine Learning (ML) based on the probabilistic
attribute from the dataset. Through this process irrelevant and approach and Gaussian distribution. Gaussian Naive Bayes
redundant information is removed for the application of assumes that each parameter (also called features or
classifiers [5]. predictors) has an independent capacity of predicting the
output variable. The combination of the prediction for all
(4) Methodology: parameters is the final prediction that returns a probability
of the dependent variable to be classified in each group. The
In this proposed system applied different Machine final classification is assigned to the group with the higher
Learning algorithms like Decision Tree, Support Vector probability.
Machine (SVM), Logistic Regression (LR), and
GaussianNB.

IV. RESULT AND ANALYSIS


A. Decision Tree:

Decision tree classifiers utilize greedy methodology. It is


a supervised learning algorithm where attributes and class
labels are represented using a tree [15]. The main purpose
of using Decision Tree is to form a training prototype which
we can use to foresee class or value of target variables by
learning decision rules deduced from previous data (training
data). The Decision tree can be described by two distinct
types, namely decision nodes and leaves. The leaves are the
results or the final end results. Each node in the tree acts as
a test case for some attribute, and each edge descending
from that node corresponds to one of the possible answers Fig 2 : Accuracy Comparison
to the test case. This process is recursive in nature and is
repeated for every sub-tree rooted at the new nodes [22].
The confusion matrix used to determine the performance
of the classification models for a given set of test data. It
can only be determined if the true values for test data are
known.
The matrix itself can be easily understood, but the related [4] Jain, Sonal, and Dharavath Ramesh. "Machine Learning
terminologies may be confusing. convergence for weather based crop selection." In 2020
IEEE International Students' Conference on Electrical,
Electronics and Computer Science (SCEECS), pp. 1-6.
Training Accuracy Score 99.5% IEEE, 2020.
Validation Accuracy Score 99.3% [5] Gandge, Yogesh. "A study on various data mining
techniques for crop yield prediction." In 2017
International Conference on Electrical, Electronics,
Table 1 : Algorithm vice Accuracy Result in Percentage Communication, Computer, and Optimization
Techniques (ICEECCOT), pp. 420-423. IEEE, 2017.
Based on the results provided, we can see that the model [6] Suresh, A., P. Ganesh Kumar, and M. Ramalatha.
performs great with 99.3% accuracy. "Prediction of major crop yields of Tamilnadu using K-
means and Modified KNN." In 2018 3rd International
Conference on Communication and Electronics
Systems (ICCES), pp. 88-93. IEEE, 2018.
V. CONCLUSION
We have developed and applied a smart system that can [7] Kamatchi, S. Bangaru, and R. Parvathi. "Improvement
suggest suitable crops for farmers across India. This system of Crop Production Using Recommender System by
would help the farmers choose the best crop based on Weather Forecasts." Procedia Computer Science 165
factors like Nitrogen, Phosphorous, Potassium, PH Value, (2019): 724-732.
Humidity, Temperature, and Rainfall. By using this research [8] Bondre, Devdatta A., and Santosh Mahagaonkar.
we can increase productivity of the country and produce "Prediction of Crop Yield and Fertilizer
profit out of such a technique. This research can enhance Recommendation Using Machine Learning Algorithms."
the country’s productivity and profitability by using this International Journal of Engineering Applied Sciences
technique. This way, farmers can grow the right crop and and Technology 4, no. 5 (2019): 371-376.
increase their income and the country’s overall earnings. We
have evaluated machine learning algorithms and discovered [9] Suresh, G., A. Senthil Kumar, S. Lekashri, and R.
that Decision Tree and Gaussian NB had the best accuracy Manikandan. "Efficient Crop Yield Recommendation
among them. System Using Machine Learning For Digital Farming."
International Journal of Modern Agriculture 10, no. 1
(2021): 906-914.
VI. FUTURE WORK [10] Reddy, D. Anantha, Bhagyashri Dadore, and Aarti
Watekar. "Crop recommendation system to maximize
The system can be enhanced further to add following
crop yield in ramtek region using machine learning."
functionality:
International Journal of Scientific Research in Science
1. The main future work’s aim is to improved dataset with and Technology 6, no. 1 (2019): 485-489.
larger number of attributes.
[11] Pudumalar, S., E. Ramanujam, R. Harine Rajashree, C.
2. We need to build a model, which can classify between Kavya, T. Kiruthika, and J. Nisha. "Crop
healthy and diseased crop leaves and also if the crop has recommendation system for precision agriculture." In
any disease, predict which disease is it. 2016 Eighth International Conference on Advanced
Computing (ICoAC), pp. 32-36. IEEE, 2017.
3. To build website and mobile app for easy to use.
[12] Garanayak, Mamata, Goutam Sahu, Sachi Nandan
Mohanty, and Alok Kumar Jagadev. "Agricultural
VII. REFERENCES Recommendation System for Crops Using Different
Machine Learning Regression Methods." International
[1] Kumar, Y. Jeevan Nagendra, V. Spandana, V. S. Journal of Agricultural and Environmental Information
Vaishnavi, K. Neha, and V. G. R. R. Devi. "Supervised Systems (IJAEIS) 12, no. 1 (2021): 1-20.
Machine learning Approach for Crop Yield Prediction
in Agriculture Sector." In 2020 5th International [13] Jejurkar Siddhi, S., S. Bhosale Meghna, and D. N.
Conference on Communication and Electronics Wavhal. "Crop Predication and Diseases Detection Using
Systems (ICCES), Machine Learning." (2021).
pp. 736-741. IEEE, 2020. [14] Rajak, Rohit Kumar, Ankit Pawar, Mitalee Pendke, Pooja
[2] Nigam, Aruvansh, Saksham Garg, Archit Agrawal, and Shinde, Suresh Rathod, and Avinash Devare. "Crop
Parul Agrawal. "Crop yield prediction using machine recommendation system to maximize crop yield using
learning algorithms." In 2019 Fifth International machine learning technique." International Research
Conference on Image Information Processing (ICIIP), pp. Journal of Engineering and Technology 4, no. 12
125-130. IEEE, 2019. (2017):
950-953.
[3] Medar, Ramesh, Vijay S. Rajpurohit, and Shweta Shweta.
"Crop yield prediction using machine learning [15] Doshi, Zeel, Subhash Nadkarni, Rashi Agrawal, and
techniques." In 2019 IEEE 5th International Conference Neepa Shah. "AgroConsultant: Intelligent Crop
for Convergence in Technology (I2CT), pp. 1-5. IEEE, Recommendation System Using Machine Learning
2019. Algorithms." In 2018 Fourth International Conference
on
Computing Communication Control and Automation recurrent 3D convolutional neural networks."
(ICCUBEA), pp. 1-6. IEEE, 2018. International Journal of Applied Earth Observation and
[16] Mahule, Ankit Arun, and A. J. Agrawal. "Hybrid Geoinformation 102 (2021): 102436.
Method for Improving Accuracy of Crop-Type [26] Meshram, Vishal, et al. "Machine learning in
Detection using Machine Learning." International agriculture domain: A state-of-art survey." Artificial
Journal 9, no. 2 (2020). Intelligence in the Life Sciences 1 (2021): 100010.
[17] Akshatha, K. R., and K. S. Shreedhara. [27] Dataset - Link:
"Implementation of machine learning algorithms for crop
recommendation using precision agriculture." https://www.kaggle.com/datasets/atharvaingle/crop-
International Journal of Research in Engineering, recommendation-dataset
Science and Management (IJRESM) 1, no. 6 (2018):
58-60.
[18] Dighe, Deepti, Harshada Joshi, Aishwarya Katkar,
Sneha Patil, and Shrikant Kokate. "Survey of Crop
Recommendation Systems." (2018).
[19] Jaiswal, Sapna, Tejaswi Kharade, Nikita Kotambe, and
Shilpa Shinde. "Collaborative Recommendation System
For Agriculture Sector." In ITM Web of Conferences,
vol. 32. EDP Sciences, 2020.
[20] Ghadge, Rushika, Juilee Kulkarni, Pooja More, Sachee
Nene, and R. L. Priya. "Prediction of crop yield using
machine learning." Int. Res. J. Eng. Technol.(IRJET) 5
(2018).
[21] Kulkarni, Nidhi H., G. N. Srinivasan, B. M. Sagar, and N.
K. Cauvery. "Improving Crop Productivity Through A
Crop Recommendation System Using Ensembling
Technique." In 2018 3rd International Conference on
Computational Systems and Information Technology
for Sustainable Solutions (CSITSS), pp. 114-119.
IEEE, 2018.
[22] Kumar, Avinash, Sobhangi Sarkar, and Chittaranjan
Pradhan. "Recommendation system for crop
identification and pest control technique in agriculture."
In 2019 International Conference on Communication
and Signal Processing (ICCSP), pp. 0185-0189. IEEE,
2019.
[23] S. M. PANDE, P. K. RAMESH, A. ANMOL, B. R.
AISHWARYA, K. ROHILLA and K. SHAURYA,
"Crop Recommender System Using Machine Learning
Approach," 2021 5th International Conference on
Computing Methodologies and Communication
(ICCMC), Erode, India, 2021, pp. 1066-1071, doi:
10.1109/ICCMC51019.2021.9418351.
[24] Bhuvan, S., Alankriti Jain, and J. Sanjeetha.
"DigiFarm– A Machine Learning based holistic Crop
Prediction Platform for Farmers." NVEO-NATURAL
VOLATILES & ESSENTIAL OILS Journal| NVEO
(2021): 11112- 11129.
[25] Qiao, Mengjia, et al. "Crop yield prediction from multi-
spectral, multi-temporal remotely sensed imagery using

You might also like