0% found this document useful (0 votes)
41 views6 pages

(IJETA-V11I3P38) :abhay Purohit, Avnish Kumar, Ritu Vaishnav, Shubham Singh

Agriculture is a means of survival. Machine learning (ML) and deep learning (DL) have the potential to provide a real-world operational solution to yield issues. Given the current manual counting system, climate-friendly alternatives are needed. The results acquired through pest control and satellite images are not entirely reliable. The main focus of this research is on using machine learning approaches to predict yields. Here, the classifier model comprises logistic regression, naive Bayes, an

Uploaded by

editorijeta
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)
41 views6 pages

(IJETA-V11I3P38) :abhay Purohit, Avnish Kumar, Ritu Vaishnav, Shubham Singh

Agriculture is a means of survival. Machine learning (ML) and deep learning (DL) have the potential to provide a real-world operational solution to yield issues. Given the current manual counting system, climate-friendly alternatives are needed. The results acquired through pest control and satellite images are not entirely reliable. The main focus of this research is on using machine learning approaches to predict yields. Here, the classifier model comprises logistic regression, naive Bayes, an

Uploaded by

editorijeta
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/ 6

International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

RESEARCH ARTICLE OPEN ACCESS

Smart Farming an ML and DL based WebProject


Abhay Purohit, Avnish Kumar, Ritu Vaishnav, Shubham Singh
Department of Computer Science and Engineering Global Institute of Technology
(RTU Affiliated) Jaipur, Rajasthan

ABSTRACT
Agriculture is a means of survival. Machine learning (ML) and deep learning (DL) have the potential to provide a real-world
operational solution to yield issues. Given the current manual counting system, climate-friendly alternatives are needed. The results
acquired through pest control and satellite images are not entirely reliable. The main focus of this research is on using machine learning
approaches to predict yields. Here, the classifier model comprises logistic regression, naive Bayes, and random forest, with random
forest delivering the highest accuracy. Farmers can use machine learning algorithms to predict crop yield by taking into account
factors such as temperature, rainfall, and area. This bridges the gap between technology and the agricultural sector.
Keywords—Crop_yield_prediction; logistic_regression; naïve bayes; random forest; weather_api

I. INTRODUCTION results showed that Random Forest is the best classifier. Leo
Brieman [2] is an expert in random forest algorithm accuracy,
Agriculture has been the primary activity of all cultures and strength, and correlation. The Random Forest algorithm constructs a
civilizations throughout human history. It is not only essential decision tree for each data sample, predicts the data from each
for the economy, but it is also vital for our survival. In India, it subset, and then votes to provide a good answer to the system.
is a crucial sector that employs a significant portion of the Random Forest uses the bagging method to train the data. Injected
population. However, the demand for production has increased randomness should minimize correlation while maintaining intensity
exponentially, leading to the misuse of technology for mass to achieve accuracy. Balamurugan [3] used only random forest
production. The use of new hybrid varieties has become classifiers to implement yield forecasting, considering various
common, but these do not provide the necessary nutrients found factors such as precipitation, temperature, and season. The dataset
in naturally produced crops. These unnatural methods harm the was not subjected to any other machine learning algorithms.
soil and contribute to environmental damage. To prevent losses, However, due to a lack of comparison and quantification, a suitable
many farmers resort to these techniques, but if they have algorithm could not be provided in the absence of other algorithms.
accurate crop yield information, losses can be minimized. Mishra [4] theoretically describes various machine-learning
techniques that can be used in various predictive areas. Their work,
Machine learning is a rapidly evolving approach that can assist however, does not implement the algorithm and thus cannot provide
the agricultural industry in making sound decisions to improve clear insight into the utility of the proposed work. Y. Jeevan and
their applications. Most devices today are supported by models M.D. Nagendra Kumar [5] concluded that machine learning
that are tested before deployment. Using machine learning algorithms can be used to generate the appropriate function through
models to improve agricultural throughput is the main idea. a set of variables that can map the input variables to the target
Precision agriculture is the focus, where quality is guaranteed output. The Random Forest ML algorithm can be used to make
against unfavorable environmental factors. To make accurate predictions and reduce the number of models used while still
forecasts and deal with inconsistencies in trends, machine delivering the most accurate crop predictions, according to this
learning classifiers such as logistic regression, Naive Bayes, paper.
and Random Forest can be used. Among these classifiers, the
Random Forest algorithm produces the most accurate results. III. METHODOLOGY
The system forecasts yields based on a collection of historical A. Data Pre-Processing
data on weather, temperature, and a variety of other factors. The
application we created runs the algorithm and displays a list of Data preprocessing is the process of transforming raw data into a
plants that are suitable for the input data, as well as the clean dataset that can be used for analysis. Raw data is often
predicted yield values. collected from various sources and is in an unusable format. To
make it understandable, several techniques, such as replacing
II. LITERATURE SURVEY missing values, can be used. The final step in data preprocessing is
to split the data into training and test datasets. The training dataset
A study conducted by Aruvansh Nigam, Saksham Garg, and is used to teach the machine learning algorithm how to make
Archit Agrawal [1] has revealed that random forest machine accurate predictions, and it usually contains around 80% of the
learning algorithms when tested on Indian government datasets, data. Figure 1 illustrates a few preprocessed data rows.
provide the highest accuracy in yield prediction. The study
found that sequential models, such as Simple Recurrent Neural Crop yields and production are influenced by numerous factors. These
Networks, predict precipitation well, whereas LSTMs predict factors are used to predict the yield of each crop throughout the year.
temperature well. For yield prediction, the study took into This paper considers the effects of temperature, precipitation, area,
account various factors such as precipitation, temperature, humidity, and wind speed on crop yields. Figure 1 displays the plant
season, and area. When all these parameters were combined, the name and its attributes that are used to predict yield calculations.

ISSN: 2393-9516 www.ijetajournal.org Page 209


International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

Fig. 1. Preprocessed data

B. Comparison and Selection of Machine Learning Algorithm


Before selecting an algorithm, it is essential to evaluate and compare
each one to determine the best fit for the dataset. Machine learning is
an effective way to provide a practical solution to the yield problem.
There are several machine learning algorithms available to predict
yields. This white paper includes a comparison of different machine
learning algorithms based on their selection and accuracy.
• . Logistic regression:-. Logistic regression is a
supervised learning classification algorithm that
predicts the probabilities of target variables. It is a
binary algorithm, meaning that it can only classify
two types of target or dependent variable. When
applied to a dataset, the logistic regression algorithm Fig. 2. Flowchart for Random Forest Model
provides an accuracy of 87.8%.
• Naive Bayes:-, The Naive Bayes classifier
assumes that the presence of one attribute in a D. System Architecture
class is independent of the presence of other
attributes in that class. This model is easy to In Figure 3, you can see the system architecture, which mainly
construct and is especially useful for handling consists of meteorological APIs. These APIs collect useful data such
as temperature, humidity, and precipitation. Once the data is retrieved,
large datasets due to its simplicity.Even highly
it is sent to the server module where it is stored in a database. Users
sophisticated classification methods have can create an account on the mobile app by registering once and
been known to outperform Naive Bayes. It providing basic information like their location and region.
has a 91.50 percent accuracy rate.
• Random Forest:- Random forests can be used to
study plant growth in relation to current climatic
conditions and biophysical changes. This
algorithm creates a decision tree for each data
sample, predicts the data from each subset, and
then votes to improve the system's solution. To
train the data, the bagging method is used in
random forests, which improves the accuracy of
the results. According to our research, RF has an
accuracy rate of 92.81 percent. Out of the three
algorithms, Random Forest clearly outperforms
the others in terms of accuracy.

C. Random Forest Model for Crop Prediction


A random forest is a collection of tree predictors, each of
which is based on the value of an independently sampled
random subset. All trees in the forest have the same
distribution. The data was trained using the bagging method
by Random Forest, resulting in improved accuracy. We used
a random forest algorithm to achieve high accuracy. It
provides the accuracy of the predicates per model as well as
the actual results of the predicates in the dataset. The model's
prediction accuracy is estimated to be 91.34 percent. Figure
2 depicts a flow chart of a random forest model for
forecasting yields.

ISSN: 2393-9516 www.ijetajournal.org Page 210


International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

The majority of the data that is entered is sent to the server.


The server has an educated Random Forest algorithm that • Heroku: Heroku is a container-based cloud platform
uses all of the fetched and entered data to predict crop yields. that enables developers to create, run, and maintain
This algorithm can uncover the expected crop yield for a applications entirely in the cloud. For the server
specific area.. portion of this document, Heroku is used. You can
connect your Heroku account to your GitHub
repository and deploy it once it's been created..

IV. DISCUSSIONS
In this paper, crop production is boosted using machine
learning techniques. This technology uses high-accuracy
predictions to determine the right crop based on its yield.
To implement machine learning algorithms in Python 3.8.5
(Jupyter Notebook), input libraries such as Scikit Learn,
Numpy, Keras, and Pandas are used. However, the results
of the machine learning analysis were questioned by the
developer. The plant name and yield were then displayed
in an Android app based on Flutter.

A. Datasets Used
Fig. 3. System Architecture
E. Proposed System The datasets have been obtained from different official

We have developed a mobile application that predicts crop Government websites:


names and calculates yields based on those predictions. The • data.gov.in-Details regarding area, production,
yield is determined by taking into account the area and crop name.
production, whereas the name of the crop is determined by • indianwaterportal.org -Depicts rainfall
considering several characteristics such as temperature, details.
humidity, wind speed, and rainfall. We use a random forest • power.larc.nasa.in –Temperature, humidity,
classifier to predict the crop, and the crop forecasts with the wind speed details.
highest accuracy values are taken into account.G. System The total number of instances in the dataset is 4261. In 14
Analysis districts of Kerala, this includes information such as crop name,
area, production, temperature, rainfall, humidity, and wind
• Python 3.8.5(Jupyter Notebook):. Python is a speed. You have the exact dataset you require during the data
programming language used for machine learning preprocessing phase. Figure 4 shows a heatmap with the
research. Jupyter Notebooks display the analysis individual attributes in the heatmap displayed.
process and outcomes.

Weather_API (Open Weather Map The Weather API is a


tool that provides real-time weather information for a
specific location by generating an API key. This
information can be used to forecast crop yield.

• Visual Studio (Version 3.4.1): The official IDE for


application development is Visual Studio. Flask
Python is used for frontend design..

• Python Flask Framework (Version 2.0.1): Flask is a Fig. 4. Heat Map


micro-framework written in Python.Flask is based B. Classifiers Used
on the

WSGI (Web Server Gateway Interface) toolkit and Three machine learning classifiers - logistic regression,
the Jinja2 template engine. Use PaperFlask as the random forest, and naive bayes - were trained and compared
backend framework for building your application. for accuracy using the dataset.
This is a collection of modules and libraries that allow
developers to write applications without writing low-
level code such as protocols and thread management.

ISSN: 2393-9516 www.ijetajournal.org Page 211


International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

ALGORITHM ACCURACY
RANDOM FOREST 92.81407341690006

NAÏVE BAYES 91.49626790098573

LOGISTIC REGRESSION 87.8298929223341

Table I : Comparison Table

In Kerala, we conducted a study on various plants that were readily


available. We identified them and estimated the amount of yield that
could be obtained based on the factors such as area, production,
temperature, humidity, rainfall, and wind speed. We used a random
forest classifier to train the preprocessed dataset and then used real-
time meteorological data accessed via the API for the selected area
Fig. 5.Comparison Plot to make accurate forecasts. After training the model, we were able to
To showcase the model's performance, a comparison chart has accurately predict the crop forecast for the selected area..
been constructed and is displayed in Figure 5. The Random Forest
classifier exhibited the highest accuracy among the three E. Crop Yield Calculation
classifiers utilized.
The Random Forest classifier mapped the predicted crops to their
C. Weather_ API Used respective production volumes and calculated yield by dividing area by
volume [1].
You can use the Weather _API to access the current weather data Yield= Production/Area
where you need it. API used to get weather data
The expected plant name for each yield helps farmers
determine the right time to plant the right crop for maximum
yield.

F. Web Application

Fig. 6. API Output


The program we used was called "OpenWeatherMap". After
entering the location name, we accessed the required
measurement elements such as temperature, wind speed,
humidity, and precipitation using the generated API key. The
current weather for the entered location was displayed as a
description on Graph 6.
Fig. 7. Home Screen
Furthermore, we input API data into the trained dataset to indicate
the crop name and yield. A web application based on machine learning and deep learning has
been developed to query the results of machine learning analysis. The
D. Crop Name Prediction application supports Android OS version 7 and has been created using
the Java programming language. It has a user-friendly interface that
requires only a few taps to get the desired results. The Android app
As a first step towards predicting suitable crops for any given time suggests the right crop to grow based on the location and size of the
and area, we utilized the most precise random forest classifier... field. The app accesses the user's details to query machine learning
analysis and uses an API to provide weather data details based on the
location. The machine learning classifiers use the retrieved weather
data to predict the crop and calculate the yield. The server then fetches
the output and displays it in the application.

The application has three main functions: account creation, detail


entry, and results fetch. The account creation feature allows the user to
interact more actively with the application interface. To proceed to the
results activity, the user must fill out the field on the home page. The
retrieved data is fed into a machine learning model, and the crop name
is predicted based on the yield value calculated. The application is
designed to be simple and efficient, making it easy for users to get the
information they need quickly and easily.

ISSN: 2393-9516 www.ijetajournal.org Page 212


International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

V. CONCLUSION
The objective of this white research paper is to utilize machine 2022.
learning techniques to predict crops and estimate crop yields. To [13] K. Gautam, S. K. Yadav, K. Kanhaiya and S.
ensure accuracy, various machine learning methods were utilized. Sharma, "Hybrid Software Development Model Outcomes
The yield for the selected area was predicted using a random forest for In-House IT Team in the Manufacturing Industry" in
classifier. The proposed method involves implementing a system International Journal of Information Technology Insights &
for predicting crops based on historical data. This system will help Transformations (Eureka Journals), vol. 6, no. 1, pp. 1-10,
farmers decide which crops to plant in their fields. The information May 2022.
obtained from this task can be used to conduct efficient and [14]Pradeep Jha, Deepak Dembla & Widhi Dubey ,
informative harvests. Accurately predicting different specific crops “Implementation of Transfer Learning Based Ensemble
in different districts will be beneficial for farmers in Kerala, and it Model using Image Processing for Detection of Potato and
will help boost the Indian economy by increasing crop yield rates. Bell Pepper Leaf Diseases”, International Journal of
VI. FUTURE SCOPE Intelligent Systems and Applications in Engineering,
12(8s), 69–80, 2024.
In the upcoming years, you may consider implementing a data- [15]Pradeep Jha, Deepak Dembla & Widhi Dubey, “Deep
independent system that works with equal accuracy regardless of learning models for enhancing potato leaf disease
the format. Incorporating soil knowledge into the system can aid prediction: Implementation of transfer learning based
in plant selection, making it more advantageous. Proper watering stacking ensemble model”, Multimedia Tools and
is also a crucial aspect of plant cultivation. Precipitation can help Applications, Vol. 83, pp. 37839–37858, 2024.
determine whether additional watering is required. By sharing this [16]P. Upadhyay, K. K. Sharma, R. Dwivedi and P. Jha, "A
research work throughout India, it can reach new heights. Statistical Machine Learning Approach to Optimize
Workload in Cloud Data Centre," 2023 7th International
REFERENCES Conference on Computing Methodologies and
[1]Aruvansh Nigam, Saksham Garg, Archit Agrawal "Crop Communication (ICCMC), Erode, India, 2023, pp. 276-
Yield Prediction Using ML Algorithm", 2019 280, doi: 10.1109/ICCMC56507.2023.10083957.
[2]Leo Brieman, "Random Forest", 2001 [17]Pradeep Jha, Deepak Dembla & Widhi Dubey , “Crop
[3] Priya, P., Muthaiah, U., Balamurugan, M. Predicting Crop Disease Detection and Classification Using Deep Learning-
Yield Using Machine Learning Algorithms, 2015 Based Classifier Algorithm”, Emerging Trends in Expert
[4] Mishra, S., Mishra, D., Santra, G.H. , "Application of Applications and Security. ICETEAS 2023. Lecture Notes
Machine Learning Technology in Agricultural Production", in Networks and Systems, vol 682, pp. 227-237, 2023.
2016 [18]P. Jha, D. Dembla and W. Dubey, "Comparative Analysis
[5]dr Y Jeevan Kumar, "Supervised Learning Approach to Crop of Crop Diseases Detection Using Machine Learning
Production", 2020 Algorithm," 2023 Third International Conference on
[6] Ramesh Medar, Vijay S, Shweta, "Yield Forecasting Using Artificial Intelligence and Smart Energy (ICAIS),
Machine Learning Technology", 2019 Coimbatore, India, 2023, pp. 569-574, doi:
[7] Ranjini B Guruprasad, Kumar Saurav, Sukanya Randhawa, 10.1109/ICAIS56108.2023.10073831.
Machine Learning Methodology for Paddy Yield Estimates [19]P. Jha, R. Baranwal, Monika and N. K. Tiwari, "Protection
in India: Case Study, 2019 of User’s Data in IOT," 2022 Second International
[8] Sangeeta, Shruthi G, "Design and Implementation of Crop Conference on Artificial Intelligence and Smart Energy
Yield Prediction Models in Agriculture," 2020 (ICAIS), Coimbatore, India, 2022, pp. 1292-1297, doi:
[9]M.Mathur, Rahul Jain, “DETECTION OF FRUIT 10.1109/ICAIS53314.2022.9742970.
DISEASES WITH HYBRID, DWT-GLCM APPROACH”, [20]P. Jha, T. Biswas, U. Sagar and K. Ahuja, "Prediction with
Eur. Chem. Bull. 2023, 12(Special Issue 7), 613-624. ML paradigm in Healthcare System," 2021 Second
[10]Unmasking Embedded Text: A Deep Dive into Scene International Conference on Electronics and Sustainable
Image Analysis, Maheshwari, A., Ajmera.R., Communication Systems (ICESC), Coimbatore, India,
Dharamdasani D.K., 2023 International Conference on 2021, pp. 1334-1342, doi:
Advances in Computation, Communication and 10.1109/ICESC51422.2021.9532752.
Information Technology, ICAICCIT 2023, 2023, pp. 1403– [21]Gaur, P., Vashistha, S., Jha, P. (2023). Twitter Sentiment
1408 Analysis Using Naive Bayes-Based Machine Learning
[11]Internet of Things (IoT) Applications, Tools and Security Technique. In: Shakya, S., Du, KL., Ntalianis, K. (eds)
Techniques, Kawatra, R., Dharamdasani, D.K., Ajmera, Sentiment Analysis and Deep Learning. Advances in
R,et.al. 2022 2nd International Conference on Advance Intelligent Systems and Computing, vol 1432. Springer,
Computing and Innovative Technologies in Engineering, Singapore. https://doi.org/10.1007/978-981-19-5443-6_27
ICACITE 2022, 2022, pp. 1633–1639 [22]P. Jha, D. Dembla and W. Dubey, “Implementation of
[12]K. Gautam, A. K. Sharma, K. Kanhaiya and J. Dabass, Machine Learning Classification Algorithm Based on
"Temperature Measurement Using Fiber Bragg Grating Ensemble Learning for Detection of Vegetable Crops
Sensor for Industrial Applications" in International Journal Disease”, International Journal of Advanced Computer
of Current Research in Embedded System & VLSI Science and Applications, Vol. 15, No. 1, 2024.
Technology (Eureka Journals), vol. 7, no. 1, pp. 26-36, July
594, 2024.

ISSN: 2393-9516 www.ijetajournal.org Page 213


International Journal of Engineering Trends and Applications (IJETA) – Volume 11 Issue 3 May - Jun 2024

ISSN: 2393-9516 www.ijetajournal.org Page 214

You might also like