0% found this document useful (0 votes)
126 views

Farming Made Easy Using Machine Learning

The document describes a machine learning system to help farmers by predicting crop prices, recommending optimal crops and fertilizers, and providing weather forecasts. The system uses decision tree regression to predict crop prices based on rainfall, price indexes, month and year. It also recommends suitable crops based on location and cultivation times to maximize yields. Additionally, it provides guides and allows farmers to purchase recommended fertilizers and seeds near their location. The overall goal is to help farmers increase profits and support the country's agricultural economy.

Uploaded by

Avishek Jana
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)
126 views

Farming Made Easy Using Machine Learning

The document describes a machine learning system to help farmers by predicting crop prices, recommending optimal crops and fertilizers, and providing weather forecasts. The system uses decision tree regression to predict crop prices based on rainfall, price indexes, month and year. It also recommends suitable crops based on location and cultivation times to maximize yields. Additionally, it provides guides and allows farmers to purchase recommended fertilizers and seeds near their location. The overall goal is to help farmers increase profits and support the country's agricultural economy.

Uploaded by

Avishek Jana
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/ 5

2021 2nd International Conference for Emerging Technology (INCET)

Belgaum, India. May 21-23, 2021

Farming Made Easy using Machine Learning


Manasi Jadhav Neha Kolambe Shreya Jain
Department of Information Technology, Department of Information Technology, Department of Information Technology,
Sardar Patel Institute of Technology, Sardar Patel Institute of Technology, Sardar Patel Institute of Technology,
Mumbai, India Mumbai, India Mumbai, India
[email protected] [email protected] [email protected]
2021 2nd International Conference for Emerging Technology (INCET) | 978-1-7281-7029-9/20/$31.00 ©2021 IEEE | DOI: 10.1109/INCET51464.2021.9456351

Sheetal Chaudhari
Department of Information Technology,
Sardar Patel Institute of Technology,
Mumbai, India
[email protected]

Abstract — Agriculture is the primary mainstay of the forecast the weather helping the farmer make correct
economy in our country. In recent years because of uncertain decisions regarding field ploughing, field harvesting etc.
trends in climate and other fluctuations in the price trends, the Similarly, fertilizers play an important role. Fertilizers load
price of the crop has varied to a larger level. Farmers remain the soil with the required nutrients that the crops eliminate
oblivious of these uncertainties, which spoils the crops and from the soil. Crop yields and production will be
causes massive loss. They are unaware of the crop type which fundamentally decreased if fertilizers are not used. That is
would benefit them most. Due to their limited knowledge of the reason fertilizers are utilized to enhance the soil’s
different crop diseases and their specific remedies, crops get supplement stocks with minerals that can be immediately
damaged. This system is handy, easy-to-use. It provides
assimilated and utilized by crops. Our system will provide
accurate results in predicting the price of the crop. This
framework utilizes Machine Learning’s Decision Tree
fertilizer consumption based on different crops and provide a
Regression Algorithm to predict crop price. The attributes portal to buy the fertilizers and seeds from the user’s
considered for prediction are rainfall, wholesale price index, location. They can even get the exact location along with the
month, and year. Consequently, the system gives an advance address of the fertilizer and seed shop. The provided
forecast to the farmers' which grows the speed of profit to fertilizers will get more profit to the farmers on the growing
them and consequently the country's economy. This system system suggested crop. It will also show the best suited crop
also incorporates other modules like weather forecast, crop based on cultivation date and month and location details,
recommendation, fertilizer recommendation, and shop, chat thereby maximizing the yield.
portal, and guide are also implemented.
It will provide multilingual and region specific guide
Keywords — agriculture, decision tree regression, price books for the farmers. Any farmer who is new to this field
prediction, weather forecast, fertilizer, machine learning and who wishes to gain information from his ancestors but
having the same methods documented will be highly
I. INTRODUCTION beneficial. We have also provided maps for the farmers to
India being a rural nation, its economy transcendently gain knowledge. Our system will provide two different types
relies upon agricultural yield development and unified agro- of maps for the farmer to gain the knowledge about how the
industry items. It is currently quickly advancing towards a land and where they should start their farming. Irrigation
specialized turn of events. India now is rapidly progressing maps show the irrigated-non irrigated area over the country.
towards technical development. Smart farming is changing Agriculture land view map will provide an overview of
the face of agriculture in India. Technology can provide a agricultural land present in various states of India and help
solution to most challenges farmers face. It can help them farmers to analyze the non Agricultural land which can
predict weather more accurately, decrease waste, boost further be improved. Maps make the farmers easy to
output and increase their profit margins. In the status quo, the understand they have to just hover on the state they are
farmers and the consumers find it difficult in the real world thinking of starting their farming and they will get the
to determine the accurate prices of crops without having information about that state and they can decide whether they
prior knowledge of the fluctuating trend prices or weather should change the place or should start farming. If the
conditions. Accordingly, innovation will end up being farmers are new in this field it is the best thing for them as
helpful to agriculture. The paper aims to predict crop prices the most important thing in farming is to firstly choose the
in advance. This work is based on finding proper regional land and place of farming.
datasets that help us in achieving high accuracy and better Moving in the same direction, our system will
performance. Our system, Agro-Genius, is using Machine incorporate a chat application which helps in information
Learning to build the Price Predicting Model. sharing. Often farmers have certain queries which cannot be
In the past few years, a lot of fluctuation in the prices of solved due to their limited knowledge, hence we are building
the crop has been seen. This has increased the rate of crop a platform where information can be exchanged. Language
damage produced each year. The main aim of this prediction can pose as a barrier to the users. Since the majority of non-
system is to ensure that the farmers get a better idea about English speaking farm workers in India are native Hindi-
their yield and deal with the value risk. speakers, we anticipate that once these resources are
developed they might be translated to other languages as
Weather is also highly unpredictable these days. It also well. Hence, to make the website user friendly, we have
affects the crop production. The proposed system will also provided language translation.

978-1-7281-7029-9/21/$31.00 ©2021 IEEE 1

Authorized licensed use limited to: Univ of Texas at Dallas. Downloaded on October 09,2021 at 06:37:19 UTC from IEEE Xplore. Restrictions apply.
Farmers should know about their location, date of suggesting agriculture produce and dispersion for farmers.
cultivation of their crop. Our system is a web application, Utilizing this framework, We ought to get the same accuracy
which is developed based on machine learning concepts. The indeed when an information autonomous framework is
proposed system applies machine learning and prediction utilized. Further, can be enhanced by making an android
algorithms like Naive Bayers, Decision Trees and K-Nearest application for the same.
Neighbour to identify the most accurate model and then
process it. This in turn will help predict the price of the crop. III. PROPOSED SYSTEM

II. LITERATURE SURVEY A. Description


We have used Python for basic programming in all
The following papers focused on predicting crop price
modules. Flask is used for hosting. Socket Programming is
using Machine Learning and providing results. In April
used for a chat application. Chart.js is used for visualizing
2019, the exploration targets foreseeing both the cost and
the maps. JavaScript is used for validation purposes.
benefit of the given harvest before planting. The preparing
datasets so acquired give enough bits of knowledge to For Weather Forecast [12] and fertilizer shop location,
foresee the suitable cost and request in the business we have used APIs. Using the self-made dataset and concept
sectors[1]. The authors have predicted the most profitable of linear regression in machine learning we have
crops and its expected price during harvesting time according implemented a Crop recommendation model so that a farmer
to the location, by predicting different historical raw datasets can learn about the best suited crop for a particular region.
using different machine learning algorithms. The work In Fertilizer Recommendation we have used a dataset for
shown by Nishiba [2] is the expected utilization of data predicting which fertilizer should be used for the disease
mining procedures in foreseeing the harvest yield dependent present on crops. Socket programming is used for farmers
on the input parameters average rainfall and area of the field. interaction using provided chat application [3]. Google API
The easy-to-use website page created for anticipating crop is used for providing a multilingual website for ease to read.
yield can be utilized by any client by giving the normal
precipitation and region of that place. Different Data Mining Refer Figure no. 1 to navigate through the web
techniques are applied to different datasets. This paper can application.
also include certain modules [11] which can help farmers to B. Comparison of Algorithm
make certain decisions based on the harvested area or current
trends in the market. The system can be extended by TABLE I. COMPARISON OF THE ALGORITHMS
visualizing the crop details in a map with details, which will
help farmers to view the nearby district cultivation details.
Proposed system can be enhanced by providing a graphical
visualization of predicted prices for better understanding.
This system is proposed to provide help to the farmers for
expecting the best amount for their crops and for predicting
the best price for the crops. This also helps the farmers to
check previous prices of different commodities. The system
can predict crops using [9] Random forest, Polynomial
Regression and Decision Tree algorithms. The best crop and
its required fertilizers make the farmer more confident about
the crop and its yield and also our system will do marketing
work [4] by estimating total value of the crop based on So, we will be using the Decision Tree Regression
current market price. The idea of the system can be extended Algorithm for crop price prediction which gives
by adding some extra features to the system like providing a approximately 95-97% accuracy.
nearby shop location portal for purchasing seeds and
fertilizers. C. Decision Tree Regression Algorithm
These papers aim at predicting the price and forecast The decision tree regression machine-learning technique
through web application and it runs on efficient machine watches features of an item and trains a model in the
learning algorithms like using an Autoregressive Integrated structure of a tree to anticipate data later on to make
Moving Average (ARIMA) model,Traditional ARIMA [6], significant nonstop output. Continuous output means that the
Support Vector Regression Algorithm[8], and technologies output is not discrete, a known set of numbers or values.
having a general easy to use interface to the clients. The The input to the algorithm is: -
training datasets [7] acquired give sufficient bits of
knowledge to foreseeing the appropriate price [10] and 1. Input parameter
request in the markets. The results are displayed as web 2. Training dataset
applications in order that poor farmers can access easily. Formulas used for prediction
Models can be improved by integrating this with other
departments like horticulture, sericulture, and others towards ܵܵ‫ ܧ‬ൌ  σ௜ఢ௦ଵሺ‫ݕ‬௜ െ ‫ͳݕ‬ሻ ൅  σ௜ఢ௦ଶሺ‫ݕ‬௜ െ ‫ʹݕ‬ሻ
the agricultural development of our country. Different
agriculture departments have various problems in the current
Where y1and y2 are the values of the dependent variable
time. Incorporating them will not only increase the scope but
in group s1and s2 that is wholesale price index parameter in
also help the farmers new to this part of the spectrum. Their
the dataset
work may be expanded by building a framework for

Authorized licensed use limited to: Univ of Texas at Dallas. Downloaded on October 09,2021 at 06:37:19 UTC from IEEE Xplore. Restrictions apply.
Fig. 1. Flow Diagram of AgroGenius (all modules)

For bunch s1 and s2 that is rainfall, it will recursively


part the indicator esteems inside gatherings. The process
stops when the sample size of the split group falls below a
certain threshold.
Steps to Implement the Algorithm

Fig. 3. Decision Tree Regression

The default value for the parameter controlling the size of


the tree is max_depth to decrease memory utilization and
complexity.
The performance of decision tree regression is estimated
by three metrics - Mean Absolute Error, Mean Square Error
and R2 score.
IV. IMPLEMENTATION
The dataset which is used is obtained from the official
site of the government of India.
We trained the model on KNN, Naive Bayers, Decision
Tree Regression algorithms and found that the Decision Tree
Regression algorithm reduced the overfitting problem. It also
improved accuracy significantly.

Fig. 2. Steps to Implement the Algorithm


We performed testing and training on our dataset. The
model was trained and thus the results obtained were noted.

Authorized licensed use limited to: Univ of Texas at Dallas. Downloaded on October 09,2021 at 06:37:19 UTC from IEEE Xplore. Restrictions apply.
Then, compared the expected result with the initial data In this graph, the Real values are plotted with “Red”
set. Later, we used the test samples to estimate the accuracy colour and the Predicted values are plotted with “Green”
of the model. We predicted the accuracy of the model with colour.
different algorithms. Out of the 3 algorithms used, we
concluded that the Decision Tree Regression gave the best In Figure 4, output shows a little deviation from the real
results and hence used the same to train our model. values. We have achieved an accuracy of ~97% after training
the model.
In Weather Forecast, using the openweathermap API, we
are forecasting the weather by taking the city name as an
input from the user.
For Crop Recommendation, the user has to give input
parameters such as Date of Cultivation and Location. Using
the self-made dataset of Maharashtra state and applying
linear regression, crop recommendation model which will
display most suitable and least suitable crops.
For Fertilizer Recommendation, we are taking crop name
and disease present on the crop as an input and by using the
dataset we are displaying the appropriate recommended
fertilizer.
Fig. 5. Prediction Errors
To see nearby Agri-Shop, we initialized google API and
using location and recommended fertilizer, location of Figure 5 visualizes the prediction errors.
nearby shops is displayed.
We get the weather forecast of 5 days with 3 hours of
For Chat, we initialized socket and established a interval showing temperature, maximum temperature,
connection between client and server. minimum temperature, humidity, weather group and weather
description
V. RESULTS
Utilizing this framework, we ought to get the same Farmers get the recommendation for the best suited crop
accuracy indeed when an information autonomous and least suited crop for the entered location.
framework is utilized. The farmer gets the recommended fertilizer on the
For testing purposes, we have calculated the mean disease name provided by the farmer on the crop.
absolute error, Coefficient of determination R2 and Variance Once the farmer sees the fertilizer, he can easily shop the
score of both training and testing dataset. Along with that we fertilizer and some required seeds using the shopping portal
have calculated accuracy for the test dataset. created.
For Paddy: Farmers can communicate with each other easily by
2
R of the Test Set: ~0.9999 selecting the chat option. Group chat is also made available.

R2 of the Train Set: 1.0 To make the website multilingual, we have used google
translation to translate the website in 20+ languages.
Mean absolute error test set: 1.64
VI. CONCLUSION
Test Variance score: 0.98
This project is undertaken using machine learning and
Mean absolute error Training Set: 4.72 evaluates the performance by using KNN, Naive Bayes, and
Training Variance score: 0.70 Decision Tree algorithms. In our proposed model among all
the three algorithm Decision Tree gives the better yield
Test Set Accuracy ~ 0.9773 prediction as compared to other algorithms
As most extreme sorts of harvests will be secured under
this system, farmers may become more acquainted with the
yield which may never have been developed. The work
exhibited the expected utilization of machine learning
methods in foreseeing the harvest cost dependent on the
given attributes. The created web application is easy to
understand and the testing accuracy is over 90%.
VII. FUTURE SCOPE
This system can be enhanced by building a model with an
increase in the number of crops. This paper aims at
recommending crops in Maharashtra. We can extend our
research by including region wise dataset. Organic fruits and
vegetables can also be taken into consideration to increase
Fig. 4. Real Values versus Predicted Values the scope of the project.

Authorized licensed use limited to: Univ of Texas at Dallas. Downloaded on October 09,2021 at 06:37:19 UTC from IEEE Xplore. Restrictions apply.
Lastly, include category-wise AgriVideos. Farmers will [6] Nguyen, Huy Vuong, et al. "A smart system for short-term price
be able to choose the category in which section they want to prediction using time series models." Computers & Electrical
Engineering 76 (2019)
browse and watch videos related to that category.
[7] Sangeeta, Shruthi G, Design And Implementation Of Crop Yield
Prediction Model In Agriculture, International Journal Of Scientific &
REFERENCES Technology Research Volume 8, Issue 01, January 2020
[1] Rachana, Rashmi, Shravani, Shruthi, Seema Kousar, Crop Price [8] Rohith R, Vishnu R, Kishore A, Deeban Chakkarawarthi, Crop Price
Forecasting System Using Supervised Machine Learning Algorithms, Prediction and Forecasting System using Supervised Machine
International Research Journal of Engineering and Technology Learning Algorithms, International Journal of Advanced Research in
(IRJET), Apr 2019 Computer and Communication Engineering, March 2020
[2] Nishiba Kabeer, Dr.Loganathan.D, Cowsalya.T, Prediction of Crop [9] Naveen Kumar P R, Manikanta K B, Venkatesh B Y, Naveen Kumar
Yield Using Data Mining, International Journal of Computer Science R, Amith Mali Patil, Journal of Xi'an University of Architecture &
and Network, June 2019 Technology, 2020.
[3] J. Vijayalakshmi, K. PandiMeena, Agriculture TalkBot Using AI, [10] Kumar, Y. Jeevan Nagendra, et al. "Supervised Machine learning
International Journal of Recent Technology and Engineering (IJRTE), Approach for Crop Yield Prediction in the Agriculture Sector." 2020
July 2019 5th International Conference on Communication and Electronics
[4] Gamage, A., & Kasthurirathna, D. Agro-Genius: Crop Prediction Systems (ICCES). IEEE, 2020.
Using Machine Learning, International Journal of Innovative Science [11] Pandit Samuel, B.Sahithi , T.Saheli , D.Ramanika , N.Anil Kumar,
and Research Technology, Volume 4, Issue 10, October – 2019 Crop Price Prediction System using Machine learning Algorithms,
[5] Vohra Aman, Nitin Pandey, and S. K. Khatri. "Decision Making Quest Journals Journal of Software Engineering and Simulation, 2020
Support System for Prediction of Prices in Agricultural Commodity." [12] Rubhi gupta, Review on weather prediction using machine learning,
2019 Amity International Conference on Artificial Intelligence International Journal of Engineering Development and Research,
(AICAI). IEEE, 2019. 2020

Authorized licensed use limited to: Univ of Texas at Dallas. Downloaded on October 09,2021 at 06:37:19 UTC from IEEE Xplore. Restrictions apply.

You might also like