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

Method and System For Predicting Crop Yields and Recommending Fertilizers Using Machine Learning Algorithms

In the recent years ensuring food security plays a major role in the agricultural sector and contributing towards the nations growth. This paper presents a communal system that makes use of elegant machine learning techniques and models to forecast accurate yield of the selected crop and advocates the felicitous fertiliser.
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)
67 views5 pages

Method and System For Predicting Crop Yields and Recommending Fertilizers Using Machine Learning Algorithms

In the recent years ensuring food security plays a major role in the agricultural sector and contributing towards the nations growth. This paper presents a communal system that makes use of elegant machine learning techniques and models to forecast accurate yield of the selected crop and advocates the felicitous fertiliser.
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

Volume 9, Issue 5, May – 2024 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAY215

Method and System for Predicting Crop Yields and


Recommending Fertilizers using
Machine Learning Algorithms
1
Spoorthi A. Hunshal; 2Sanjana R.; 3Himani Pitta; 4Shiva Kumar R. Naik

Abstract:- In the recent years ensuring food security plays recommendation, our proposed approach aims to effectively
a major role in the agricultural sector and contributing enhance agricultural output.
towards the nations growth. This paper presents a
communal system that makes use of elegant machine II. LITERATURE SURVEY
learning techniques and models to forecast accurate yield
of the selected crop and advocates the felicitous fertiliser. The author P.M. Durairaj explore the challenges of yield
By exploiting the agricultural datasets, our system prediction in agriculture. They leverage open data
employs the Extra Trees Regressor trees which helps for repositories and government agricultural databases to address
the prediction of the yield and to analyse the most these challenges. Their approach integrates deep
recommendable fertilizer it makes use of the Gaussian reinforcement learning (DRL) and recurrent neural networks
Naïve Bayes algorithm. This dormant system provides the (RNN), particularly the Deep Recurrent Q-Network (DRQN).
us with powerful insights. Our sight is to reshape the The proposed DRQN model achieves an impressive accuracy
conventional agricultural practices with the help of these of approximately 93.7%. Furthermore, the paper indicates
powerful insights to redefine the farming practices and to that the DRQN model outperforms existing models, showing
increase the productivity, therefore ensuring the promise for enhancing yield prediction accuracy in
legitimate agricultural practices. agriculture.[1]

Keywords:- Crop Yield Prediction, Fertilizer The author Rajat Bishnoi and others have collected the
Recommendation, Machine Learning Algorithms, Extra dataset from the indiawaterportal.org website. They have
Trees Regressor (ETR), Gaussian Naïve Bayes (GNB). used fuzzy logic to predict the yield of the crop as it operates
on continuous range of value instead of discrete values, to
I. INTRODUCTION process and rebuild the rainfall dataset. To predict the
temperature and rainfall they have applied the auto regressive
Agriculture plays an indispensable role in the economies models. Mean by doing the square method along with
of developing nations like India, serving as the main support calculating the error, the accuracy of the system is measured.
for comestibles and livelihoods for most of the population in [2]
India. Considering past few years there has been strenuous
effort to change the traditional agricultural practices and In the article the authors rely on data is collected from
upgrade the practices in use. With the help of new indiawaterportal.org. Their primary objective is to classify
technologies like artificial intelligence especially in the field soil samples based on their macro-nutrient content and predict
of machine learning, by using these tools in the agricultural the suitable crops for cultivation in that soil. To achieve this,
system to upgrade it. By considering the significant impact of they employ an ensemble classifier, which combines multiple
weather, environmental changes, rainfall variability, water distinct classifiers to provide improved predictive results
management, moister content, humidity in the soil and compared to a single classifier model. The internal classifiers
fertilizer application on crop, accurate fertilizer used include Naive Bayes Classifier, Random Forest
recommendations and crop output forecasting are imperative Classifier, and CHAID Classifier, each suggesting
for agricultural shareholder. However, due to uncertain nature appropriate crops, and considering soil conductivity, offering
of these factors poses challenges in accurately predicting and recommendations for suitable fertilizers to enhance soil
analysing crop yield, especially amidst changing climatic fertility. [3]
conditions, often resulting in suboptimal productivity. In
response to these challenges, researchers are increasingly The study addresses the pivotal issue of prediction of
turning to machine learning techniques to enhance crop crop yield and suggestion of suitable fertilizer in the context
productivity and sustainable growth. of India's agriculture. Utilizing machine learning, particularly
the Support Vector Machine (SVM) algorithm, the research
This paper proposes a communal system designed to aims to predict crop yields efficiently while offering precise
forecast crop yield and recommend fertilizers in the fertilizer recommendations. The study focuses on important
agricultural field. By harnessing agricultural datasets and crops in the region, with data gathered from various sources
employing algorithms such as the Extra Trees Regressor for over five years to support their predictive model. This
yield prediction and Gaussian Naïve Bayes for fertilizer research has the potential to significantly enhance agricultural

IJISRT24MAY215 www.ijisrt.com 882


Volume 9, Issue 5, May – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAY215

productivity and assist farmers in selecting suitable crops, optimal use of resources, and encourage the growth and
ultimately contributing to food security in India. [4] development of more sustainable farming ecosystem.

In their paper, the author address the challenge of IV. METHODOLOGY


forecast of crop yield and to suggest the fertilizer. With the
help of Support Vector Machine and Random Forest to The proposed agricultural system consolidates the
analyse five years of data related to agricultural, aiming to machine learning concepts, mainly the Extra Trees Regressor
assist farmers in crop selection and fertilizer optimization. for finding the final yield of the crop and Gaussian Naïve
The Support Vector Machine achieves a yield prediction Bayes algorithm for demonstrate the most suitable fertilizer.
accuracy of approximately 99.47%, while the Random Forest The system intents to prophecy the output of the crop and
algorithm achieves around 97.48%. [5] endorse a fertilizer based on the feed given by the end user.
Data that is selected for training the model is taken from
III. OBJECTIVES AND GOALS source, which undergoes rigorous preprocessing to refine the
raw content, and address the null vales. The model provides
Create and put into place a system for decision-making flexibility to the end users to choose between the crop yield
process which uses machine learning practices to accurately and fertilizer recommendation system. The details like
gives us the amount of agricultural produce (crop yield), season, crop, area, region of the country, rainfall are
taking into account factors such as geographical location, considered to forecast the yield. Factors like humidity, soil
changes that occur regularly during different seasons, crop nature, nitrogen, phosphorus and potassium levels, moisture
types, and cultivation area. elements in the soil are taken into consideration for endorse
the satisfactory fertilizer.
To get the fertilizer recommendations for farmers based
on single crop requirements and soil factors, targeting to For crop yield prediction, the Extra Trees Regressor is
improve resource usage for desired outcomes and reduce employed, by utilizing the dataset that is cleaned, used to train
harm to the natural surroundings. and test the model. User provided input data is taken into
consideration to forecasts the final outcome based on the
Improve agricultural output by using the predictive training given to the model by starting the process and
capabilities of the system to upgrade resource allotment, providing the perfect outcome.
improve decision-making practices, and by the end to
increase crop output. For suggesting the suitable fertilized to be used by the
farmer, Gaussian Naïve Bayes algorithm is chosen because of
Taking leading role within the agricultural sphere by its comprehensibility and capability. The model undergoes
combining different data-driven insights to lessen and reduce tailored preprocessing of data and for endorse the suitable
the ecological impacts and to improve and promote the fertilizer.

Fig 1: System Model

A. Datasets Description With the help of this dataset, for crop yield prediction
We have made use of lots of data across India which the system uses six factors and to recommend the suitable
counts up to two decades and provides a robust foundation to fertilizer it considers six key factors. The inclusivity of the
the system’s functionality. dataset enhances the efficiency and adaptability of the system.

IJISRT24MAY215 www.ijisrt.com 883


Volume 9, Issue 5, May – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAY215

The dataset covers a larger group of crops and includes given to the Extra tree regressor model as an input. the first
the most frequently grown crop across the country which is iteration takes place. After the first iteration the dataset is
used for the further process. To make the preprocessing step classified as strong and weak learners. The weak learners are
expeditious, the crop yield and fertilizer data is converted into enhanced and added back to the strong learners which results
mathematical data to ensure the equilibrium of the system. in the updated dataset and this process is continued till it
reaches the minimum error rates. As the weak learners are
B. Extra Tree Regressor enhanced in the process, it provides the best efficiency for the
Extra Trees Regressor is an extension of the Random system. Extra Trees Regressor works using fewer parameters
Forest algorithm. Extra trees regressor is used for both and also reduces the risk of overfitting, which proves to a
regression and classification tasks. It boosts the process and valuable addition to predictive model, especially in scenarios
is a part of ensemble model family as it typically consists of where accuracy is paramount.
decision trees. In the first step the pre-processed dataset is

Fig 2: Extra Tree Flowchart

C. Gaussian Naive Bayes the original dataset. A reliable and accurate outcome is
Gaussian Naive Bayes, or GaussianNB, is a known guaranteed when results are combined via majority vote. Its
supervised machine learning approach for various tasks, performance in classification tasks is remarkable which
including regression and classification. By combining several explains as to why it was chosen for this particular task.
decision trees, the ensemble approach GaussianNB improves GaussianNB was chosen because it is ensemble-based
performance of the prediction. The two main steps in the approach, helps to decrease the variance and overcome the
prediction process are: Average and voting on the various overfitting issues therefore increasing the accuracy. Also, this
clustered decision trees. Though classification tasks depend algorithm shows stability because any modifications to one
on the majority vote for accurate prediction, the regression decision tree will not substantially affect the others, and it is
tasks use an average of the various model outputs in order to capable of handling the missing values on its own. Because
generate the reliable and accurate output. This algorithm uses of the resistance to noise, GaussianNB is a suitable choice for
the bagging concept in which it creates various subsets for predictive modelling, particularly where precision and
different predictions by randomly selecting a replacement flexibility are needed.
dataset from the original dataset for each decision tree from

Fig 3: Gaussian NB Flowchart

IJISRT24MAY215 www.ijisrt.com 884


Volume 9, Issue 5, May – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAY215

V. RESULT AND ANALYSIS

A. Crop Yield Prediction:

Fig 4: Prediction of Crop Yield – Output

Fig 5: Accuracy: Yield of The Crop

With the help of the datasets arbitrary values are passed as a first step of feed to the model.

B. Fertilizer Recommendation:

Fig 6: Output: Recommending Suitable Fertilizer

Table 1: Accuracy of the Fertilizer System


Accuracy TPR F-Score Support
10-26-26 1 1 1 2
14-35-14 1 1 1 2
17-17-17 1 1 0.96 2
20-20 0.95 1 1 3
28-28 1 1 1 4
DAP 1 0.93 1 2
Urea 1 1 1 5
Weighted Mean 1 1 1 20
Macro Mean 1 1 1 20
Accuracy 1

Once the yield is predicted, the next step is the weighted average precision, recall, and F1-score metrics are
recommendation of the suitable fertilizer. The model's also impressive, standing at 100%, 100%, and 100%,
performance inspection discloses a high level of accuracy, respectively.
with an overall accuracy rate of 100%. The classification
report lends a hand to demonstrate the model's effectiveness,
with macro average precision, recall, and F1-score metrics all
exceeding 90%. Specifically, the model achieves a macro
average precision of 100%, a macro average recall of 100%,
and a macro average F1-score of 100%. Moreover, the

IJISRT24MAY215 www.ijisrt.com 885


Volume 9, Issue 5, May – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAY215

VI. CONCLUSION [10]. Jeong, J. H., Resop, J. P., Mueller, N. D., Fleisher, D.
H., Yun, K., Butler, E. E., ... & Kim, S. H. (2016).
The combined system, by making use of machine Random forests for global and regional crop yield
learning conceptualisation along with algorithms uses the predictions. PloS one, 11(6), e0156571.
Extra Trees Regressor and the Gaussian Naïve Bayes
algorithms to forecast the crop yield and to endorse the
suitable fertilizer, which provides better precision and
performance. The scheme includes to build a comprehensible
web application to set the seal on the ubiquitous accessibility
for users. In addition to the Extra Trees Regressor model, the
Gradient Boost algorithm is deliberation for intensifying the
conjecture model. In place of Gaussian Naïve Bayes
algorithm, Support Vector Machine and Decision Tree
algorithms can be traversed to further refine the prediction
model.

REFERENCES

[1]. Elavarasan, D., & Vincent, P. D. (2020). Crop yield


prediction using deep reinforcement learning model
for sustainable agrarian applications. IEEE access, 8,
86886-86901.
[2]. Bang, S., Bishnoi, R., Chauhan, A. S., Dixit, A. K., &
Chawla, I. (2019, August). Fuzzy Logic based Crop
Yield Prediction using Temperature and Rainfall
parameters predicted through ARMA, SARIMA, and
ARMAX models. In 2019 Twelfth international
conference on contemporary computing (IC3) (pp. 1-
6). IEEE.
[3]. Archana, K., & Saranya, K. G. (2020). Crop yield
prediction, forecasting and fertilizer recommendation
using Data mining algorithm. International Journal of
Computer Science Engineering (IJCSE), 9(1), 76-79.
[4]. Somwanshi, K., Sonawane, P. R., Lohar, T. S., &
Jadhav, M. S. Crop Prediction and Fertilizer
Recommendation Using Machine Learning.
[5]. Bondre, D. A., & Mahagaonkar, S. (2019). Prediction
of crop yield and fertilizer recommendation using
machine learning algorithms. International Journal of
Engineering Applied Sciences and Technology, 4(5),
371-376.
[6]. Zhang, X., Xu, M., Sun, N., Xiong, W., Huang, S., &
Wu, L. (2016). Modelling and predicting crop yield,
soil carbon and nitrogen stocks under climate change
scenarios with fertiliser management in the North
China Plain. Geoderma, 265, 176-186.
[7]. Ghadge, R., Kulkarni, J., More, P., Nene, S., & Priya,
R. L. (2018). Prediction of crop yield using machine
learning. Int. Res. J. Eng. Technol.(IRJET), 5, 2237-
2239.
[8]. [8] Filippi, P., Jones, E. J., Wimalathunge, N. S.,
Somarathna, P. D., Pozza, L. E., Ugbaje, S. U., ... &
Bishop, T. F. (2019). An approach to forecast grain
crop yield using multi-layered, multi-farm data sets
and machine learning. Precision Agriculture, 20,
1015-1029.
[9]. Chlingaryan, A., Sukkarieh, S., & Whelan, B. (2018).
Machine learning approaches for crop yield prediction
and nitrogen status estimation in precision agriculture:
A review. Computers and electronics in
agriculture, 151, 61-69.

IJISRT24MAY215 www.ijisrt.com 886

You might also like