0% found this document useful (0 votes)
306 views2 pages

Crop Recommendation System

This document describes a crop recommendation system that uses Gaussian Naive Bayesian and Random Forest algorithms to recommend crops based on soil parameters with high accuracy. The system collects data on soil nitrogen, phosphorus, potassium, pH, humidity, temperature and rainfall. It separates these features from the crop labels. Both the Gaussian Naive Bayesian and Random Forest algorithms are applied, achieving similar accuracy of around 99%. The system is then able to make crop recommendations based on new input parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
306 views2 pages

Crop Recommendation System

This document describes a crop recommendation system that uses Gaussian Naive Bayesian and Random Forest algorithms to recommend crops based on soil parameters with high accuracy. The system collects data on soil nitrogen, phosphorus, potassium, pH, humidity, temperature and rainfall. It separates these features from the crop labels. Both the Gaussian Naive Bayesian and Random Forest algorithms are applied, achieving similar accuracy of around 99%. The system is then able to make crop recommendations based on new input parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Crop Recommendation System

.
Farhan Rahman Anik
171-010-043
Computer Science and Information
Technology

Abstract: Crop recommendation system is must for our


country’s agricultural system. Data mining in agriculture is A. Data Collection
used for analyzing the various biotic and abiotic factors. For I have collected my dataset from kaggle. The data used in
my crop recommendation system I have used Gaussian Naïve this project is made by augmenting and combining various
Bayesian and Random Forest algorithms as learners to publicly available datasets of weather, soil, etc. This data is
recommend a crop for the specific parameters with high relatively simple with very few but useful features unlike the
accuracy and efficiency. By using these two algorithms I have complicated features affecting the yield of the crop. The data
been able to achieve 99% accuracy. have Nitrogen, Phosphorous, Potassium and pH values of the
soil. Also, it also contains the humidity, temperature and
Keywords: Precision agriculture; Recommendation system; rainfall required for a particular crop.
Separating features; Gaussian Naïve Bayesian; Random
Forest; Accuracy comparison.
B. Separating Features and Target Label
I. INTRODUCTION Firstly, I have separated my necessary parameters such
as Nitrogen, Phosphorous, Potassium and pH values of the
Bangladesh is one of the country who‟s economy is soil. Also, it also contains the humidity, temperature and
heavily dependent on it‟s agriculture. Our agriculture system rainfall into a variable called „feature‟. Then I have set the
is kind of ancient but in recent times the trends in agriculture „Label‟ column as my target.
has evolved drastically due to globalization. Many new
technologies have been evolved. So to keep pace with the C. Gaussian Naïve Bayes
modern agricultural system we need to improve ours. One
such improvement we can do is to shift our agricultural Naive Bayes classifier is a simple probabilistic classifier
system to precision agriculture system. Precision agriculture which works based on applying Bayes‟ theorem (from
is in trend nowadays. Precision agriculture is a modern Bayesian statistics) with strong naive independence
farming technique that uses the data of soil characteristics, assumptions. Naive Bayes is a technique for constructing
soil types, crop yield data, weather conditions and suggests classifier models which assign class labels to problem
the farmers with the most optimal crop to grow in their farms instances which are represented as vectors of feature values,
for maximum yield and profit. This technique can reduce the where the class labels are drawn from some finite set. It is
crop failures and will help the farmers to take informed not just a single algorithm for training such classifiers, but a
decision about their farming strategy. In order to mitigate the family of algorithms based on a common principle. All
agrarian crisis in the current status quo, there is a need for naive Bayes classifiers assume that the value of a particular
better recommendation systems to alleviate the crisis by feature is independent of the value of any other feature,
helping the farmers to make an informed decision before given the class variable.
starting the cultivation of crops. Many research works being
carried out, in order to attain an accurate and efficient model These Learners predict the class label for each of the
for crop prediction. Ensemble Method is one such method training data set. The class label that is predicted by the
for crop prediction. Ensemble methods are techniques that
majority of the models is voted through the majority voting
create multiple models and then combine them to produce
improved results. Ensemble methods usually produces more technique and the class label of the training data set is
accurate solutions than a single model would. In this project I decided. From the ensembled models the rules are
have used Ensemble method to build an efficient and generated.
accurate model. D. Random Forest
Random forest is a supervised learning algorithm. The
II. RAELATED WORK "forest" it builds, is an ensemble of decision trees, usually
In the paper I have found related to my topic the authors trained with the “bagging” method. The general idea of the
of that paper have also followed Ensemble method for their bagging method is that a combination of learning models
crop recommendation system. They have used majority increases the overall result.
voting technique using Random tree, CHAID, K-Nearest
Neighbor and Naïve Bayes as learners to recommend a crop One big advantage of random forest is that it can be used
for the site specific parameters with high accuracy and for both classification and regression problems. Can be built
efficiency. Their prediction accuracy of the model accounts for both nominal and numerical data. At each node it
to 88%. They had some limitations regarding dataset. considers K randomly chosen attributes. The subset ratio
parameter specifies the size of the subset.
III. SYSTEM DESIGN
E. Accuracy Comparison
For my recommendation system I have used Separating
features and target label, Gaussian Naïve Bayes and Random I have compared between the results of both of the
Forest. algorithm I have used. I found that the results are so similar
to each other. Almost identical results and it was close to
99%.
F. Making A Prediction
After completing all the tasks then I gave some input to
test my recommendation system to generate the result which
crop should I grow for particular amount of parameters
which I have set features.

IV. EXPERIMENT
I have previously tried to do some experiment on the
dataset. Like I have tried OneHot encoding for the label
column. I even tried to find Jaccard similarities, manhattan
distance and Apriori. But I have found that they are giving
me biased results. So I change my approach to Ensemble
method.

V. COMPARISON
My work is simple than the paper as I have only used two
algorithms, Gaussian naïve bayes and Random forest and
have been able to get 99% of accuracy whereas they have
used K-Nearest Neighbor, Random Tree, CHAID and had
been able to get only 88% of accuracy.

VI. CONCLUSION
Bangladesh is a nation in which agriculture plays a prime
role. In prosperity of the farmers, prospers the nation. Thus
my work would help farmers in sowing the right seed based
on soil requirements to increase productivity and acquire
profit out of such a technique. Thus the farmer‟s can plant
the right crop increasing his yield and also increasing the
overall productivity of the nation.
VII. FUTURE WORK
My future work is aimed at an improved data set with
large number of attributes and also implements yield
prediction.
REFERENCES

[1] S.Pudumalar, E.Ramanujam, R.Harine Rajashree, C.Kavya,


T.Kiruthika, J.Nisha, S.Pudumalar, E.Ramanujam, on “Crop
recommendation system for precision agriculture”. 2016 IEEE Eight
International Conference on Advanced Computing (ICoAC).

You might also like