0% found this document useful (0 votes)
39 views54 pages

21A21F0032

The document discusses an intelligent crop recommendation system that recommends crops for South Indian states based on multiple parameters like soil type, rainfall, temperature, fertilizers, and weather. It proposes a hybrid model classifier built using machine learning rules to recommend suitable crops based on geographical and climatic parameters. The system aims to maximize crop production and guide farmers by recommending optimal crops for their land. It analyzes different soil conditions and crop quality levels to provide better crop selection using multiple classifiers. The system is also used to estimate the value of future crops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views54 pages

21A21F0032

The document discusses an intelligent crop recommendation system that recommends crops for South Indian states based on multiple parameters like soil type, rainfall, temperature, fertilizers, and weather. It proposes a hybrid model classifier built using machine learning rules to recommend suitable crops based on geographical and climatic parameters. The system aims to maximize crop production and guide farmers by recommending optimal crops for their land. It analyzes different soil conditions and crop quality levels to provide better crop selection using multiple classifiers. The system is also used to estimate the value of future crops.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 54

Review on intelligent crop recommendation system

ABSTRACT
Crop recommendation systems for agriculture are based on various input parameters. It
proposes a hybrid model recommending plants for South Indian states by considering
multiple attributes, including soil type, rainfall, groundwater level, temperature, fertilizers,
pesticides and weather. The recommendation model classifier is built as a hybrid model using
the learning rule set of the device. Based on the appropriate parameters, the device will
recommend the culture. The technology-based crop recommendation tool for agriculture
helps farmers to increase crop production by recommending suitable crops for their land with
the help of geographical and climatic parameters. The proposed hybrid recommendation
version is effective in recommending suitable crops. Updating the manufacturing value of
crop production is of great importance to guide agricultural production and to inform the
farmer about changes in the market rate of the crop. The idea of this document is to
implement the method of crop selection so that this method can solve many problems for
agriculture and farmers. It improves our Indian economy by maximizing crop production.
Different types of ground conditions. Therefore, plant happiness is evaluated using a
classification process. Low-quality harvests and excessively high-quality rates are also
reported through this system. Using a set of classifiers paves the way for a better selection of
predictors due to the use of several classifiers. In addition, a classification procedure is
applied to select the results of the classifiers in an attempt to select them. This system is used
to estimate the value of future crops.

1
Index

sno topic Page no


1 Introduction
2 Literature survey
3 Feasibility Analysis
4 System Analysis
 Software Requirements Specification
Document
 Use Case Diagram
5 Design
6 UML Diagrams
7 Data Set Description
8 Machine Learning Algorithms
9 Code
10 System Testing
11 Output Screen
12 conclusion

2
INTRODUCTION

A major contribution to the Indian financial machine is made by agriculture. Many


households in India are directly or indirectly dependent on agriculture. Therefore, agriculture
is an important part of India and defines who we are as rural people. Most of India's farming
population relies on their intuition to decide which plants to plant in a particular season. They
generally follow ancestral parameters and agricultural patterns without realizing that
production depends on the climate, modern activities and soil conditions. Therefore, it is
difficult for the farmer to be responsible for all his choices due to the infinity of elements. A
wrong or wrong choice of farmer support will greatly impact India's agricultural finance
system and wider enjoyment in this area. A combination of device-aware algorithms,
traditional and scientifically collected soil parameters, and weather data can help set the right
optimum crop on the farm.

As we all know, agriculture is the driving force behind Indian financial instruments. Farming
is an important occupation in India. More than 60% of the land in the United States of
America is used for agriculture, which supports 1.3 billion people [1]. Agriculture is the
cultivation of plants and animals. Agriculture drove civilization upwards in India. We need
soil to grow plants. As a final result, soil is an important factor in agriculture. Soil suitability
is important for proper flour production. It provides important nutrients, water, and oxygen
and supports the roots. Soil is the base of the food machine and surrounds all the flowers used
in food preparation. Different types of soil are available in India. They are burnt soil (cotton,
rice), black soil (sugarcane, sunflower), red soil (maize, ragi), laterite soil (beans, tea, coffee)
etc. Many studies were conducted to improve agricultural planning.

Crop recommendations can be made using gadget control strategies. Machine learning is a
subfield of artificial intelligence that describes the ability of a machine to imitate intelligent
human behavior. Artificial intelligence frameworks are built on top of humans to automate
complex tasks. Machine learning starts with facts, including financial transactions, humans,
or snapshots. Data is collected and processed to obtain instructions for the device control
machine. If there are more records, the software program suggests higher results. The

3
developer then selects an ML model to implement, inputs information, and teaches the tool to
independently discover patterns or make predictions.

LITERATURE SURVEY

1) “Crop Selection Method to maximize crop yield rate using machine learning
technique”

AUTHORS: Rakesh Kumar

Agriculture is the backbone of Indian financial instruments and a source of employment for
tens of millions worldwide. A perennial problem faced by Indian farmers is that they do not
select plants based on environmental conditions, resulting in a loss of productivity. This
selection support machine allows solving this problem. In our test, the AI device enables
precision farming to optimize and optimize the normal crop harvest. The firm's research
selection, Industry 4.0, proposes a solution with recommender systems using AI and a range
of algorithmic learning tools. The national set used in the artwork in this test was downloaded
and fixed from Kaggle. It consists of 08 functions with 07 neutral variables, including N, P,
K, temperature, moisture, pH and precipitation. Then SMOTE state balancing method is used
for best results. Furthermore, the authors used optimization strategies to model the overall
efficiency of smart factories. Cat Boosting (C-Boost) performed well with an accuracy cost of
99.5129, F-measure-0.9916, and Precision-zero. 9918, and Kappa-0. 8870. GNB, in contrast,
outperformed ROC-0.9569 and MCC-zero. 9569 Relational categorization, regression, and
machine learning acquisition within algorithmic speed.
2)Efficient Crop Yield and Pesticide Prediction for Improving Agricultural Economy
using Data Mining
AUTHORS: RaoraneA

A large part of the Indian population considers agriculture as their main career. Plant
manufacturing plays an important role in the United States. Regular application of abnormal
or insufficient fertilizers causes less production of pleasant plants. The proposed IoT and ML
machine is primarily functional for soil evaluation using sensors based on measuring and
observing soil parameters. This system reduces the chances of soil degradation and makes it

4
easier to maintain crop health. Various sensors, including soil temperature, soil moisture, pH
and NPK, are used in this machine to detect soil nutrients of soil temperature, moisture, pH
and NP. The data detected by these sensors are stored inside the microcontroller and analyzed
using system information algorithms, like a random forest, based on the signals that are used
to increase the appropriate crop. have gone The challenge also includes a method that
specializes in using a neural network to determine whether a plant is diseased or not.

3) Soil Data Analysis Using Classification Techniques and Soil Attribute Prediction

AUTHORS:Jay Gholap
Agriculture is one of the most important contributors to the Indian economy. Most of India's
population is overtly or ostensibly dependent on agriculture for their livelihood. Therefore, it
is undeniable that agriculture plays a fundamental role in you. Most Indian farmers are happy
to rely on their intuition to decide which crop to plant in any given season. They find comfort
in following the best old farming strategies and concepts, unaware that crop production is
situational and depends on winning weather and soil conditions. However, no single grower
can be expected to ignore all the myriad elements that contribute to long-term production
before a consensus is reached on what to supply. A wrong or wrong priority on the part of the
farmer can lead to undesirable consequences in his rural financial system and neighborhood.
Combining big data analysis and device insights can help alleviate this problem. In this
article, we introduce a nifty device called AgroConsultant, which provides Indian farmers
with complete data based on planting season, geographical area of their fields, soil properties,
and environmental factors along with temperature and rainfall.
4) “Smart Farming Using Machine Learning”

AUTHORS :Dr. ShubhamPawar

India is a predominantly agricultural America, and agriculture is important in the Indian


economy and people's lives. Crops are recommended based on soil, climate, moisture, rainfall
and various variables to increase agricultural production. Now bless not only the fans but you
too. And makes it easier to keep food prices low. This document allows using machine
learning methods such as Random Forest and Decision TYee to predict which crops are
suitable for which soil types based on statistical units.

5
5) ”Crop recommendation system for precision agriculture”

AUTHORS: S. Pudumalar
The three simple things essential to a person's survival are food, safe shelter and clothing.
The latter two have amazing clinical momentum in the latest technological era.
Unfortunately, agriculture is still considered a deeply human subject. Most farmers are
illiterate and have little or no scientific experience in agriculture. Therefore, they must rely on
a successful and well-thought-out method of luckily evaluating, which wastes time and
resources. Our tool specializes in building a predictive model to recommend the most suitable
flowers for production on a particular farm based entirely on multiple parameters. It can be
beneficial for farmers to be more productive and efficient without wasting their supplies and
grow the most viable plants.

6
FEASIBILITY STUDY
A feasibility study is a detailed evaluation that considers all the key elements of a
proposed project that you can use to determine its chances of success. It can generally
describe the success of a business in terms of return on investment, which means that the
challenge generates enough revenue to justify financing. However, on the plus or minus side,
it can identify various important elements, network responses, and environmental
influences. Although feasibility research can assist project managers in assessing risks and
undoing a course of action, they must consider several steps before proceeding.

The feasibility study has three main aspects into account.

1. ECONOMIC FEASIBILITY
It is a cost-benefit analysis of the project being tested and assessing whether it is feasible to
proceed. This period is designed to assess and analyze the mission's ability to support
decision-making by objectively identifying the associated powers, liabilities, possibilities and
threats, the resources required to execute the task, and assessing the likelihood of this
happening.
2. TECHNICAL FEASIBILITY
Technical feasibility is the formal method of evaluating whether or not the production of a
product or service is technically feasible. Before launching a new presentation or acquiring a
client company, planning and preparing for each step of the process is critical. Technical
feasibility allows determining the effectiveness of the proposed plan by analyzing the method
that includes equipment, squeezing, weaving, labor, and logistics.

3. SOCIAL FEASIBILITY

7
Social Feasibility is one of the feasibility considerations that believes individuals'
approval of the product to be released. Represents the impact on users of the preface of the
new machine about whether there was a requirement for attendants retraining. Explains how
to provide user association beforehand customizations are broadcasted.

SYSTEM ANALYSIS

EXISTING SYSTEM:

Agriculture is an important part of the world and the backbone of the Republic of India. The
situation in agriculture is dire. The results of temperature patterns and their uncertainty have
made most agricultural plants mature in production. Accurate crop growth forecasting is an
important factor in crop forecasting management. Such forecasts will delay federal industries
in their generation offerings. ML is a method for finding new models from large statistical
units. Various regression techniques can be used, including random forest, linear regression,
choice tree regression, multinomial regression, and support vector regression. Area and
production are stored within the climatic information produced by vital statistics. This work
studies ML regressions for deciding crop yield indicators through precision evaluation of a
pair of systems with a general improvement percentage of 3.6% compared to several existing
strategies.

DISADVANTAGES OF EXISTING SYSTEM:

 Low Efficzency.

 We cannot predict the recommended crops.


 In existing system, we cannot used any deeplearning algorithms.

Algorithm: Random Forest

PROPOSED SYSTEM:

To get rid of the aforementioned disadvantages, we recommend that you use a smart tool for
crop recommendations, which takes into account all the appropriate parameters, combined
with the conditions of temperature, rainfall, area and soil, it is expected to be suitable for

8
cultivation. This machine is mainly concerned with the appearance of the first function of
AgroConsultant, which is the transfer of crop advice to farmers' algorithms In addition to
providing income assessment of cultivated plants in unique cases that are presented to the
person Easy and reliable visualization for identification and crop planning.

ADVANTAGES OF PROPOSED SYSTEM:

1. Reduction of problems can be done by implementing new techniques on agriculture


2. This application helps them to predict the yield.
3. This will help the farmers which crop to be selected for their land or the region

Algorithms:

Support Vector Machine,and Naive Bayes ,Decision Tree,Linear Regression, K-Nearest


Neighbor and Neural Network

Software Requirements Specification Document

Software Requirements:

 Operating System: Windows operating System 7/8/10


 Programming: Python, Django
 Deep Learning.
 Convolutional Neural Network.

Hardware Requirements:

 Processor: Intel
 Hard Disk: Min 160 GB
 Ram: Min 4GB
 Monitor: LED/LCD

PYTHON INTRODUCTION

Python is easy to understand and a functional programming language to learn. It has an


efficient login structure and a reliable and simple approach to object-oriented programming.

9
Python's modern syntax, intuitive scripting, and parsed nature make it an excellent language
for scripting and the rapid development of multi-region software on most architectures.

The Mega-style Python compiler and library are accessible as a demo or in binary for all
main stages for free from the Python website https://www.Python.Org/ and are free to
distribute. The excellent website also contains doubts and suggestions for various
uncompressed Python modules, packages, tools, 1/3 uncompressed components, and other
documentation.

The Python compiler is easily extended with new functions and types of reports that run in C
or C++ (or other languages that can be called from C). Python is also appropriate as an
allowance language for customizable requests.

This instructible presents the reader casually to the main principles and landscapes of the
Python language and tool. It is helpful to have an accessible Python interpreter to enjoy the
applause, but all the examples are self-contained, allowing the researcher to learn effectively
offline.

Why to Learn Python?

Python is a high-level, text-based, cooperating, object-oriented language. Python is intended


to be fully human-legible. Major terms are often used in English because special languages
use punctuation and have much less grammatical structure than exceptional languages.

Python is important for learners and professionals to become an excellent software


developer, especially while at the same time being involved in the field of Internet
improvement. I will list some of the most important benefits of mastering Python:

Python is interpreted: Python is managed by the compiler at run time. You don't want to
buy the software before you go; It's miles like PERL and PHP.

Interactive Python: You can sit in the spark of Python and instantly interact with the
compiler to write your applications.

Object-Oriented Python: Python supports the object's method or object-oriented


programming approach that summarizes code confidential tools.

Python is a language for beginners: Python is an excellent language for beginners-level


programmers and benefits to develop a variability of packages, ranging from simple text
gratified dispensation to browsers and video games.

10
CHARACTERISTICS OF PYTHON
 Following are the main features of Python programming:
 Supports realistic and established programming approaches in adding to OOP.
 It can be used as a programming language or translated directly into secondary code
to create excellent programs.
 It has excellent dynamic information and makes it easy to check active species.
 Facilitates the automatic left-over chain.
 Easily covered with C, C++, COM, CORBA and Java.

History of Python
 Guido van Rossum developed the Python language at the US National Research
Institute for Mathematics and Informatics in the Netherlands in the late 1980s and
early 1990s.
 Python comes from many languages, including ABC, Modula-3, C, C++, Algol-6,
Smalltalk, Unix shell, and micro script languages.
 Copyright by Python. Like Perl, the Python port code is now licensed under the GNU
General Public License (GPL).
 Python is now maintained at the Institute using an Intermediate Enhancement Kit,
although Guido van Rossum was instrumental in guiding its development.

Features of Python Language

Python's structures include −

 Ease of Learning: Python has some key phrases, a bot structure, and a unique
syntax. Allows the researcher to check the language rapidly.

 Ease of reading: Python code is described in addition to being viewed by the eye.

 Ease of maintenance: Easy to maintain reasonable Python supply code.

 Large and modern library: Most of the Python library is probably very moveable
and has a mobile platform, similar to UNIX, Windows.

 Interactive Mode: Python helps in cooperating method, which allows you to


experiment and debug pieces of code interactively.

 Portable: Python can track on a range of hardware systems and has the same edge
on all platforms.

11
 Expandable: We will add low-level components to the Python translator. These
modules allow developers to introduce or modify their devices to make them more
environmentally friendly.

 Databases: Python offers interfaces for all core business databases.

 GUI Programming: Python supports GUI packages that can be built and ported to
many Windows system calls, libraries, and systems, including Windows MFC,
Macintosh, and Unix X Window System.

 Scalable: Python offers a better look and feels for larger packages of scripts

Tkinter API :

Tkinter is the actual Python way of creating graphical user interfaces (GUIs), and it's covered
in all of my favorite Python distros. It's the only framework built into my favorite Python
library.

This Python framework delivers an interface to the Tk toolkit and acts as an object-oriented
thin layer on top of Tk. Tk Toolkit is a cross-platform set of graphical management, also
known as user interface elements, for building application interfaces.

This framework provides Python clients an easy way to create GUI agents that allow the use
of UI elements defined in the Tk Toolkit. Tk-Tools can create buttons, menus, fact fields, and
much more. In the Python tool. Once created, these graphic traders can collaborate or interact
with unique skills, abilities, strategies, stats or UI factors.

HTML :

HTML stands for Hypertext Markup Language. It is a widely used markup linguistic for
web pages. It permits creating and structuring of segments, paragraphs, and hyperlinks
utilizing HTML operators (the building blocks of a website), including tags and
characteristics.

HTML has many use cases, most notably:

Web Development: Developers utilized HTML code to shape how a browser demonstrations
web page elements that contain text content, hyperlinks, and media files.

12
Internet navigation: Users can simply navigate between related pages and sites and insert
hyperlinks as HTML is used closely to embed links.

Web docume:ts. HTML allows the document to be prepared and formatted correspondingly
to Microsoft Word. It should also be noted that HTML is not always an option as a
programming language, as it can no longer generate dynamic features. It is now measured a
valid Internet audience. The World Wide Web Consortium (W3C) upholds and develops the
HTML specification, although it is updated daily.

CSS :

Cascading Style Sheets (CSS), called CSS, is a simple strategy language that simplifies
creating attractive websites.

CSS is concerned with the look and feel of a part of a web page on the Internet. With CSS,
you can manage text content shading, font, column size, formatting, traditional snapshots or
colours used, layout design, display changes for specific devices and display sizes, and other
results.

CSS is comfortable to know and understand, but it delivers efficient handling of the flow of
an HTML record. CSS is often confused with HTML or XHTML markup languages.

CSS is designed and supported by a group in the W3C known as the CSS Working Group.
The CSS process set produces files called specs. When the specification is expressed and
formally authorised by W3C members, it becomes advice.

These confirmed specifications are named suggestions because the W3C does not support the
actual performance of the language. Separate companies and organizations create this
program.

Javascript :

JavaScript is a dynamic programming language for special computer systems. It is


lightweight and suitable for application as part of web pages whose packages allow custom
scripts to interact with people and create dynamic pages. It is an interpreted programming
language with object-oriented capabilities.

JavaScript was first named LiveScript, but Netscape changed its name to JavaScript, probably
because I laughed with Java. JavaScript was first considered in Netscape 2.Zero in 1995

13
under the name LiveScript. Half of the specified language reason is integrated into Netscape,
Internet Explorer and various Internet browsers.

Client-side JavaScript is the most widely used form of the language. The script must be
omitted or referenced in the browser's HTML input to interpret the code.

JavaScript's forward leak mechanism offers many benefits over traditional CGI server scripts.
For example, you can use JavaScript to confirm that the customer entered a valid email
address in the form question.

JavaScript code ends even when the consumer submits the form; If all inputs are valid, they
can be sent to the web server.

JavaScript can inspire client-initiated mathematical activities, including button clicks, link
navigation, and movements initiated with the help of some other character, both explicitly
and implicitly.

LIBRARIES :
Beautiful Soup:

Beautiful Soup is a Python library for buying information from HTML and XML files. It
works with your favourite parser to provide intuitive ways to navigate, view, and create parse
trees. This usually saves programmers hours or days of work.

This guide suggests all the simple capabilities of four beautiful soups through examples. I'll
show you the library's intent, how it works, how to use it, how to do what you want it to do,
and what to do if it doesn't meet your expectations..
Pandas :

Python Pandas is an open-source library that provides real and efficient manipulation in
Python. This academy is designed for all amateurs and experts.

It is used for statistical analysis in Python and was developed with the help of Wes McKinney
in 2008. Our international software provides all the basic and advanced ideas of Python
Pandas, including Numpy, Data Operation, and Time Series.

Open CV:

14
OpenCV is a large open-source library for digital computing, prediction, and
testing of hardware and image processing systems. OpenCV supports many programming
languages except Python, C++, Java, etc. You can create animations and images to
understand someone's devices, faces, or fonts. When combined with several libraries, as well
as the Numpy library, which is highly optimized for numerical operations, the number of
weapons in your arsenal will increase; Something you can do in Numpy can be combined
with OpenCV. 
Seaborn :

Seaborn is a great visual library for graph data pictures in Python. It provides normal patterns
and exceptional color palettes to make your data plots attractive. It is constructed entirely on
the Matplotlib library and is carefully combined into the Pandas data structures.

Seaborn's goal is to make fiction a vital part of discovering truth and knowledge. Provides
APIs that focus on the dataset, so we scroll through summary visualizations of equal
variables to get a better knowledge of the dataset.

Sklearn :

sklearn is an open-view Python library that extends various algorithms for system domain,
pre-processing, Go validation, and visualization through a unified interface. A simple and
environmentally friendly device for data mining and statistical analysis. It includes various
separations, regression, clustering algorithms, auxiliary vector machines, random forests,
gradient optimization, fitting strategies, and more. It is available to everyone and can be
reused in certain contexts. Based on NumPy pico, SciPy and Matplotlib. Freely available and
commercially available: BSD license.

Wxpython :

Python offers the wxpython module that allows us to create a user-friendly GUI. It's an open-
source module, so it's free for miles for anyone and anyone to use, and the source code is
available for anyone to view and customize.

It is a GUI toolkit for the Go platform for Python; Phoenix Edition Phoenix is the most
superior next generation of wxPython, specializing in speed, storage, and scalability.
Numpy:

15
NumPy is a widely used matrix processing package. The multidimensional array object
provides high performance and tools for employed with these selections. It is the basic
package for medical calculating with Python. It is open-source software. It includes various
features besides these important features.

Besides its obvious clinical benefit, NumPy can also be used as an effective multidimensional
box with global records. Any type of dataset can be described using Numpy, allowing
NumPy to be seamlessly and quickly integrated with a rich type of database.
Python-Data Base Communication

MySQL is an open-source interactive SQL database organization system. MySQL is one of


the high-quality RDBMS units used mainly for the growth of many web-based programs.
MySQL is advanced, marketable and compatible with MySQL AB, a Swedish company. This
tutorial will provide a quick start to MySQL and make you feel comfortable with MySQL
programming.

MySQL Database
MySQL is a fast and easy-to-use database management device used by many organizations,
large and small. MySQL is developed, marketed and supported by MySQL AB, a Swedish
company. MySQL has become very popular for several good reasons:

 MySQL has been modified to be released under an open-source license. So you don't
need to pay anything to use it.
 MySQL is a powerful program in itself. It caters to a huge subset of the more expensive
and powerful database software.
 MySQL takes advantage of the existing form of the popular SQL Stats.
 MySQL runs on many commercial languages and architectures, including PHP, PERL,
C, C++, JAVA, etc.
 MySQL works out of the box and works correctly regardless of large loggers.

USE CASE DIAGRAM

Use case diagrams are generally known as behavioral descriptions that can be used to
explain the quick and difficult actions (use cases) that some devices or structures (issues)
must or can impose in cooperation with one or more external clients of the device (actors).
Each use case must provide a valued and preferred outcome for exceptional actors or

16
stakeholders within the system.

17
SYSTEM DESIGN

SYSTEM ARCHITECTURE

18
DATA FLOW DIAGRAM:

A data flow diagram (DFD) maps data into any technology or machine. Use symbols
demarcated as circles, rectangles, and short text tags to reveal statistical inputs, productions,
garage factors and routes among every endpoint. Data flow diagram can variety from modest
system descriptions, even to hand-drawn, to the intensity of multi-level DFD intensity that
addresses step-by-step how to handle records. It can be utilized to search for a current device
or a new device model. Like all great charts, DFD can frequently visually "tell" problems that
are difficult to describe with words, and that works for both procedural and non-technical
viewers, from developer to CEO. For this reason, why, DFD is still very popular at the end of
these years. While it looks great for facts-derived programs and structures, it may be less
appropriate today to show applications, interactive, real-time, or database-oriented structures.

1. The Object-Oriented Analysis and Design (OOAD) are chosen by Yourdon and Peter
Coad to analyses and strategy a program or mechanism.
2. Structured Systems Analysis and Design Method (SSADM) is a flowing approach to
researching and designing record structures. This strict documentation method differences
with current agile tactics such as Scrum and Dynamic Systems Development Method
(DSDM).

19
20
UML DIAGRAMS

Unified Modelling Language (UML) is the language of the way to presentation diagrams in
software engineering. The primary purpose of UML is to describe a modern approach to
imagine the way the tool is designed. They are very similar to the schemes utilized in other
production fields.
UML is not a programming language; it is a graphical language alternative. We utilise UML
diagrams to represent system behaviour and figure. UML designates software engineers,
entrepreneurs, and hardware engineers with modelling, structure, and research. The Object
Management Group (OMG) followed the Standard Modelling Language benchmark in 1997.
OMG has always controlled it with this in mind. The International Organization for
Standardization (ISO) disseminated UML as an authorized option in 2005. The UML has
been modified over time and is regularly revisited.
CLASS DIAGRAM:

The class diagram is static and represents the program's continuous view. A class diagram is
not always the best quality for visualizing, describing and reporting the unique components of
the tool but also for creating executable code to enforce the program. An Class diagram
describes the properties and operations of the separation as well as the device boundaries.
Level diagrams are often used in object-oriented modelling structures because they can be
nice UML diagrams easily tuned for object-oriented languages
.

21
SEQUENCE DIAGRAM:

The sequence diagram illustrates the relations among objects in sequential ordering, the order
in which these relations inhabit an area. We can also utilize proper schemas of presentations
or suitable procedures to consult a sequence diagram. Sequence diagrams define how and in
what order the objects occur on the machine. Software developers and organizations
generally utilize these diagrams to record and analyses the appetites of new and existing
systems.

22
ACTIVITY DIAGRAM:

We use of activity diagram is to show management flow on the device. We can also use a
hobby chart to indicate the steps involved in implementing the use case—a copy of
concatenated and synchronized actions using action graphs. So, we visualize the workflow
using a hobby chart. The hobby scheme specializes in going conditions with the flow and

23
sequence in which it occurs. We define or describe what reasons a specific occasion to use an
activity graph.

DATABASE DESIGN:

24
Suggested Uses for SQLite:

 Internet of Things database. SQLite is a common desire for the database engine in cell
phones, PDAs, MP3 players, TV boxes and many other digital devices. SQLite has a
small code footprint, which makes it particularly reliable for green usage of memory,
disk space, and bandwidth. Now it does not require any updates from the database
administrator.
 Design an application report. Use an SQLite database instead of using open () to
comment out the XML, JSON, CSV, or some exact disk document layout your
application uses. You'll avoid hiding and troubleshooting from a scanner, your records
will be easily accessible in a hive, and your updates will be transactional.
 Site database. Because it requires no configuration and stores logs in regular disk
documents, SQLite is a popular database for small and medium-sized websites.
 An opportunity for an RDBMS organization. SQLite is often used as an RDBMS
proxy for demos or testing. SQLite is fast and requires no configuration, which
eliminates many scanning problems and makes demos great and easy.

25
Data Set Description

For the system, we are using various datasets all downloaded for government website

and kaggle.

Datasets include:-

Cost of cultivation per ha dataset for major crops in each state

Yield dataset

Modal price of crops

Standard price of crops

Soil nutrient content dataset

Rainfall Temperature dataset

Yield Dataset: This dataset contains yield for 16 major crops grown across all

the states in kg per hectare.Yield of 0 indicates that the crop is not cultivated

in the respective state.

• Cost of Cultivation dataset:This dataset provides the cost of cultivation for each

crop in Rs. per hectare.

• Modal price of crops: This dataset gives the average market prices for those

crops over a period of two months

• Standard price of crops:This dataset gives the current market price of the crops

in Rs per hectare .

• Soil nutrient content dataset:This dataset has five columns with the attributes

26
in the order-State,Nitrogen content,Phosophorous content,Potassium content

and average ph.The nutrient content is represented with encoded alphabetsVL,L,M,H,VH


with the meaning:

VL -Very Low

L-Low

M-Medium

H-High

VH-Very high

• Rainfall Temperature dataset:This dataset contains crops,max and min rainfall,max and min
temprature,max and min rainfall and ph values.

27
28
Machine Learning Algorithms

K-Nearest Neighbor Classifier

KNN is a type of supervised machine learning that can be used to solve a wide range of
issues. Classification and regression are examples of challenges that can be addressed. The
number of nearest neighbours to a newly

Decision Tree

Decision Trees (DTs) comes under supervised learnin for classification and regression. A tree
representation is used to solve the problem, with each leaf node representing a class label.
and the tree's interior node represents attributes.

Entropy:

H(S) = – Pi(S) log2 Pi(S) (2)

Information Gain:

IG(S,A) = H(S) – vValues(A)( |Sv|/S) H(Sv) (3)

Naive Bayes

The Bayes theorem is used to create a simple probablistic classifier called Naive Bayes.
Naive Bayes classifiers assume that the value of one feature is independent of the value of
any other feature given the class variable.

P(A|B) = (P(B|A) * P(A) )/P(B) (4)

SUPPORT VECTOR MACHINE

29
A crop recommendation system based on Support Vector Machines (SVM) is a machine
learning algorithm that can

predict which crops are best suited to a particular area based on various factors such as soil
type, climate, and water

availability. SVM is a powerful classification algorithm that can handle high-dimensional


datasets with a relatively

small number of observations, making it an ideal choice for crop recommendation systems.

SVC (Support Vector Classifier) is a type of machine learning algorithm that falls under the
category of supervised

learning. It is a variant of the Support Vector Machine (SVM) algorithm that is used for
classification tasks.SVC works

by finding the hyper plane that best separates the different classes in the data. This
hyperplane is chosen such that it

maximizes the margin between the classes, i.e., the distance between the hyperplane and the
nearest data points of each

class. Once the hyperplane is found, SVC can classify new data points by determining which
side of the hyperplane

they lie on.

SVC is a powerful algorithm that can handle both linear and non-linear classification tasks. It
can also handle highdimensional data and works well with small to medium-sized datasets.
One of the advantages of SVC is that it is less

prone to over fitting than other classification algorithms, as it maximizes the margin between
classes.

In Python, SVC is implemented in the scikit-learn library, which provides a range of tools for
machine learning tasks.

30
The SVC class in scikit-learn provides a range of hyper parameters that can be tuned to
optimize the algorithm's

performance, such as the regularization parameter and the kernel function.Overall, a crop
recommendation system

based on SVM and SVC can be a valuable tool for farmers to optimize crop yields, reduce
waste, and increase profits

while contributing to sustainable agriculture practices.

31
SOURCE CODE

User side views.py

fromdjango.http import HttpResponse

fromdjango.shortcuts import render

fromdjango.contrib import messages

# Create your views here.

defuser_login_check(request):

context = {'form': UserLoginForm()}

ifrequest.method == 'POST':

print('=000=' * 40, request.POST)

form = UserLoginForm(request.POST)

print('VALID:', form.is_valid())

ifform.is_valid():

username = form.cleaned_data.get('username')

password = form.cleaned_data.get('password')

print('UserName:', username)

print('Password:', password)

try:

user = UserRegistrationModel.objects.get(username=username, password=password)

print("User Object", user.status)

status = user.status

32
if status == 'activated':

request.session['username'] = user.username

request.session['password'] = user.password

return render(request, 'users/user_home.html')

else:

messages.success(request, 'Your A/C has not been activated by admin.')

return render(request, 'user_login.html', context)

except Exception as e:

print("Got Exception: ", e)

pass

messages.error(request, 'Invalid username or password.')

context = {'form': UserLoginForm()}

return render(request, 'user_login.html', context)

defuser_register_action(request):

ifrequest.method == 'POST':

form = UserRegistrationForm(request.POST)

ifform.is_valid():

form.save()

messages.success(request, 'Your request has been submitted, Admin will get back to you
soon.')

context = {"form": UserRegistrationForm()}

return render(request, 'register.html', context)

else:

33
messages.error(request, 'Email Already Exists.')

context = {

'form': UserRegistrationForm()

return render(request, 'register.html', context)

defadd_data(request):

return render(request, 'users/add_data.html'

defcrop_prediction(request):

ifrequest.method == 'POST':

N = request.POST.get('nitrogen')

P = request.POST.get('Phosphorous')

K = request.POST.get('Pottasium')

ph = request.POST.get('ph')

rainfall = request.POST.get('Rainfall')

def fertilizer(request):

import pandas as pd

importos

fromdjango.conf import settings

path = os.path.join(settings.MEDIA_ROOT, 'fertilizer.csv')

df = pd.read_csv(path)

df = df[['Crop', 'N', 'P', 'K', 'pH', 'soil_moisture']]

df = df.head(96).to_html

return render(request, 'users/fertilizer.html', {'dat': df})

34
SYSTEM TESTING

SYSTEM TEST

The most important goal of system testing is to identify errors in programming. Testing tries
to find every possible defect or disorder in a commodity product. Provides a strategy for
checking the overall performance of components, sub-assemblies, assemblies, and the latest
product. It is how the software works to ensure that the software engine meets consumers'
desires and expectations and stops failing in unacceptable ways. There are different types of
opinions. Each test type addresses your exact validation needs.

TYPES OF TESTS:
System testing is a degree of software testing in which complete and integrated software is
examined. This test is to assess the machine's compliance with the requirements.

In system testing, the integration that checks for previous components is taken as input. The
purpose of the integrity check is to identify any violations between the devices grouped.
System tests detect faults in both embedded devices and throughout the method. The result of
a device test is the behavior detected by a problem or system during the scan.
TYPES OF TESTING

Various types of system testings are shown in below flow chart

35
Fig.14 Types of testing

TYPES OF SOFTWARE TESTING:

ACCEPTANCE TEST

In the Acceptance test, a test method that is performed to determine whether or not the
program system meets the required specifications. The primary reason for this verification is
to assess the device's compliance with business requirements and verify whether the miles
have met the specified delivery criteria for end users.

SYSTEM TESTING

System tests are usually run with the help of a team, and this is unbiased to the upgrade group
so you can measure the first class of the fair system. It includes both functional and non-
functional tests.

INTEGRATION TESTING

When completing the reputation of unit testing, units or module that provides a batch for
integration testing will be included. The purpose of integration tests is to confirm practice,
performance, and reliability between compact units.

UNIT TESTING

36
In unit testing, a test method that is used to test individual units and it is to determine if there
are any problems with the developer himself. It indicates useful correction for independent
units.

FUNCTIONAL TEST
Functional tests provide methodological presentations that demonstrate that the capabilities
examined are available in particular with commercial assistance, technical desires, device
documentation, and people manuals.

Functional testing is aimed at subsequent devices:

Systems/Procedures: interfacing systems or procedures must be invoked.

BLACK BOX TEST

37
Black box testing is a software testing technique that examines the capability of a program
without looking at its internal structure or coding. The primary source of black container
verification is the requirements specification, which the customer specifies.

The following table explains the benefits of the black discipline above and below using
tables.

WHITE BOX TEST

The white box testing technique for software testing consists of black-and-white container
testing. Here we discuss the white box test, the field of glass. Tests the program's internal
coding and awareness infrastructure by checking predefined inputs rather than expected and
preferred outputs. It mainly depends on the application's internal workings and revolves
around examining the internal structure.

The following table lists the advantages and disadvantages of new field detection.

38
Grey-Box Testing:

Grey box testing is a software validation approach to testing a software application with
partial knowledge of the internal operating model. It combines black box and white box
testing because it includes access to the internal coding for designing test cases where white
field tests and validation practices are completed at the skill level as black box testing.

39
Comparison of testing Methods:

40
Sample test cases

41
42
SCREEN SHOTS

Home page:

User register:

43
User Add Data

44
Add data final results:

45
User view data

46
User view dataset 1

47
User view dataset 2:

48
Ml RESULTS:

49
Ml final results:

50
Admin home page:

51
Admin activate users:

52
53
CONCLUSION

This machine allows the farmer to choose the right crop through the supply Ideas that
ordinary farmers do not have and therefore diminish Possibility of bad harvest and increase in
productivity. In addition, it is prohibited incurred losses. The gadget can be extended to the
web. It can be reached by tens of millions of growers in the United States. We can Obtaining
an accuracy of 89.88 percent from the Neurological Society and 88.26% accuracy of the
linear regression model

54

You might also like