The document describes a fertilizer recommendation system created by students. It includes an introduction describing the importance of soil nutrients and need for effective fertilizer recommendations. It then outlines the objectives of creating an efficient recommendation system using machine learning algorithms. Three algorithms (Random Forest, Naive Bayes, K-Nearest Neighbors) were tested on soil data and Random Forest achieved the highest accuracy of 98% for recommending suitable fertilizers. A web application was developed using Flask and deployed on Heroku to provide recommendations to farmers.
1. A6024
Product
Realization
06/08/2022 DEPT. OF CSE(AI&ML) 1
VARDHAMAN COLLEGE OF ENGINEERING, HYDERABAD
Autonomous institute, affiliated to JNTUH
Fertilizer Recommendation
System
By
20881A6627 – K. Anuhya
20881A6660 – V. SiriChandana
21885A6603 –K. Sai Kishore
Under the guidance of
P.Swetha
Dr. Prakash Kumar Sarangi
18
2. Outline
• Introduction
• Literature Review
• Need Statement and Community Partner details
• Objectives
• Existing System vs Proposed System
• Software and Hardware Requirements
• Proposed Methods and Algorithms
• Construction of a model with a Picture
• Result Analysis
• Conclusion
• References
8/25/2022 DEPT. OF ELECTRONICS AND COMMUNICATION ENGINEERING 2
3. Introduction
•Soil testing has been accepted as a unique tool for rational fertilizer use.
•There are three main nutrients in the soil that play a major role in farming:
Nitrogen (N), Phosphorous (P), and Potassium (K) collectively known as
NPK.
•The best possible recognition of these nutrients at starting stage is essential
for the successful development of the harvest.
•Effectively estimating these nutrients in the soil and characterizing them to
recommend the fertilizer for the crop.
06/08/2022
COMPUTER SCIENCE AND ENGINEERING(AIML) 3
4. Literature Survey
•In a research carried out by Zaminur Rahman a comparative study of several
machine learning techniques has been carried out.
•They have carried out the classification using the data of Telangana. Considered the
six district soil data and used the geographical features for classification.
• They have used k Nearest Neighbor, Bagged tree, and SVM finally compared the
results of three algorithms and brought out a model for recommending fertilizers.
•The accuracy obtained by these models is around 80%.
06/08/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
4
5. NEED STATEMENT
•Farming part has a vital job in the Indian economy for GDP development in India.
•But in recent years due to multiple fertilizers present in the market, farmers get confused
and apply the fertilizer famous around their locality without a second thought.
•This leads to two major problems low yield and soil pollution. Due to insufficient
nutrients after applying fertilizers the yield of a crop is reduced.
• Due to over-fertilization, the land, and food produced from the land will be polluted.
•Fertilizer plays a major role in farming and contributes around 55% of the yield
enhancement.
06/08/2022 COMPUTER SCIENCE AND ENGINEERING(AIML) 5
6. Community Partner Details
Soil Testing Centres:
• Soil tests are performed on the soil to determine the amount of Nitrogen(N),
Phosphorus(P), and Potassium(K).
•pH of the soil can also be determined by a soil test.
•Soil test centers/laboratories are present in every district of Telangana in
regional KVKs(Krishi Vigyan Kendras) offering free services.
• The test results are then examined and certain conclusions and
recommendations are made.
06/08/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
6
7. OBJECTIVES
•To create an efficient recommendation system for fertilizers based on the
NPK values of the soil.
•To help the farmers to maximize the yield for the given crop cycle
without affecting the land and soil properties.
To ensure that healthy crops have been cultivated by reducing the
chances of over-fertilization.
•To create a user-friendly web application.
06/08/2022
COMPUTER SCIENCE AND ENGINEERING(AIML) 7
8. Existing System vs Proposed System
EXISTING SYSTEM
•Does not incorporate a web interface that
makes it easier for users to access the
system.
•Only a few parameters are considered for
prediction.
•Not scalable to larger datasets.
•Less accurate when compared to other
similar systems.
PROPOSED SYSTEM
•We provide a web interface that makes it
easier for users to access the system.
•We considered 9 parameters of soil for
prediction.
•Scalable for large datasets.
•Accuracy of the model is high when
compared to other models.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
8
9. Requirements
Hardware
• System with processor i3 or above.
•RAM(4 GB).
•Window OS
Software
•Flask
•Heroku
•Libraries like NumPy, pandas,
matplotlib, seaborn, sci-kit learn.
•HTML,CSS.
8/25/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
9
10. Proposed Model
• The data set contains 8 attributes Nitrogen, Phosphorus, Potassium, Temperature, Humidity,
Moisture, crop type, soil type, and Fertilizer.
•The data set is cleaned at this stage using the scikit-learn module. Any null values, Redundant
values, or Missing values are eliminated at this stage.
•Necessary steps like Label Encoding and Feature extraction and checking for the relationship
between attributes, and outliers are done at this stage.
•Random Forest, Naïve Bayes, and K-Nearest Neighbour are used to build a machine learning
model.
•The input is taken from the users/farmers and the prediction is using these algorithms and a
suitable fertilizer is recommended.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
10
12. Proposed Model
•Figure 2 shows the flow diagram of the fertilizer recommendation system. At first, the data sets
are collected from Kaggle.
•The dataset consists of 8 attributes Nitrogen, Phosphorus, Potassium, Temperature, Humidity,
Moisture, crop type, soil type, and Fertilizer.
•The dataset is then pre-processed by handling missing values and outliers. The data is fed to
machine learning algorithms with different training and testing ratios.
•The trained model is introduced to the users using a web interface where the user can give inputs
to the model.
•The model predicts the best fertilizer based on the given soil nutrient values. The inputs here are
soil nutrients and environmental conditions.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
12
13. Construction of the product
•Flask is a web application framework written in python.
•Heroku is a cloud hosting platform that uses AWS infrastructure with rapid scaling
capabilities, offering flexible deployment services for all kinds of applications.
•The website is constructed using Flask and it is deployed using Heroku.
•The web application consists of fields such as attributes Nitrogen, Phosphorus,
Potassium, Temperature, Humidity, Moisture, crop type, soil type, and Fertilizer.
•The model is trained with different machine learning algorithms and it predicts the
best fertilizer suitable for the soil and recommends it to the farmer through the web
application.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
13
14. Construction of the product
8/25/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
14
15. Results and Analysis
•The dataset is collected from Kaggle. The data is preprocessed and applied to the
random forest, Naive Bayes, and k nearest neighbor classification algorithms.
• In multiclass classification, the elements are classified into multiple classes. The
random forest algorithm uses trees for classification.
•The k-NN algorithms group the data based on the given number of neighbors.
•The naïve Bayes algorithm separates the data into different classes according to the
Bayes theorem.
•These classification algorithms are trained and tested with the large datasets collected
and the accuracies are noted in the below table.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
15
17. Conclusion
• Fertilizers used in agriculture contribute around 55% to the enhancement of crop
yield. The fertilizer recommendation system will help farmers to choose the best
fertilizer based on their properties.
•This recommendation system will consider all these properties of soil along with
the weather conditions such as temperature, humidity, soil type, and crop type and
recommends the best fertilizer.
• Datasets are collected and pre-processed in a python environment and different
ML algorithms such as Naive Bayes, k-NN, and Random Forest are employed.
• The Random Forest algorithm is functioning with the best accuracy of 98%.
6/8/2022 COMPUTER SCIENCE AND ENGINEERING(AIML)
17
18. References
1. Silpa, C., RamPrakash Reddy Arava, and K. K. Baseer. "AGRI FARM: CROP AND
FERTILIZER RECOMMENDATION SYSTEM FOR HIGH YIELD FARMING USING
MACHINE LEARNING ALGORITHMS.“
2. Subramanian, Kanaga Suba. (2020). Design and Implementation of Fertilizer
Recommendation System for Farmers.
3. Hernández Moreno, Rafael, Olmer Garcia, and Luis Alejandro Arias. "Model of neural
networks for fertilizer recommendation and amendments in pasture crops." (2018).
4. Shinde, Mansi, Kimaya Ekbote, Sonali Ghorpade, Sanket Pawar, and Shubhada Mone.
"Crop recommendation and fertilizer purchase system." International Journal of Computer
Science and Information Technologies 7, no. 2 (2016): 665-667.
06/08/2022 COMPUTER SCIENCE AND ENGINEERING(AIML) 18