You are on page 1of 34

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belgaum-590018, Karnataka

DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING
Phase-1ProjectReport
On

“AGRO SYSTEM DEVELOPMENT”


For the Academic year 2021-22

Submitted by:
Bhoomika Anand(1SK18CS010)
Durgalakshmi M(1SK18CS015)
Tejashri S J (1SK18CS044)
Tejaswini K(1SK18CS045)

Under the guidance of: Project Coordinator:


Prof. L. Sri Ramachandra, B.E, M.tech Dr. Pradeep Kumar K, B.E, M.tech, PhD
Assistant Professor, Dept of CSEDept of CSE, Government SKSJTI.
Government SKSJTI.

GovernmentSriKrishnarajendraSilverJubileeTechnologicalInstitute
Agro System Development

K R Circle, Bangalore-560001.

GovernmentSriKrishnarajendraSilverJubileeTechnologicalInstitute
KRCircle,Bangalore–560001

(AffiliatedtoVisvesvarayaTechnologicalUniversity,Belgaum)
DEPARTMENTOFCOMPUTERSCIENCEANDENGINEERING

CERTIFICATE:

This is to certify that project entitled “AGRO SYSTEM DEVELOPMENT”is a


bona-fide work carried out by Bhoomika Anand (1SK18CS010), Durgalakshmi
M(1SK18CS015), Tejashri S J (1SK18CS044)andTejaswini K(1SK18CS045)as a
partial fulfillment for the award of Bachelor’s Degree in Computer Science and
Engineeringfor ProjectPhase-1as prescribed by Visvesvaraya Technological
University, Belgaum for the academicyear 2021-2022.

Signature of the Guide Signature of the HOD


Prof. L. Sri Ramachandra, B.E, M.tech Dr. ShyleshchandraGudihatti K N, B.E, M.tech, PhD

Assistant Professor, Dept of CSE Professor and HOD, Dept of CSE


Government SKSJTI. Government SKSJTI.

Name of the Examiners Signature with Date


1.

2.
2
Agro System Development

ACKNOWLEDGEMENT

A unique opportunity like this come very rarely. It is indeed a pleasure for us to
work onthis project. The satisfaction that accompanies the successful completion
of this phase-1 project is incomplete without the mention of the people whose
guidance has made it possible for us tocompletethisproject.

WearegratefultoourinstitutionGovt.SriKrishnarajendraSilverJubileeTechnologi
cal Institute with its ideals and inspiration for providing us with facilities that
hasmade thisphase-1 projectsuccessful.

We are grateful to our principal Dr. K.G. Chandrasekhara, Principal


G.S.K.S.J.T.I and Dr. Shyleshchandra Gudihatti K N, Professor and Head of
the Dept. of C.S.E for providing lab facilities and valuable guidance that helped us
in completing our phase- 1project in time.

We are also grateful to our guide Prof. L. Sri Ramachandra, Assistant


Professor, Department of C.S.E and our project coordinator Dr. Pradeep
Kumar K, Department ofCSE, for helping us and understanding the relevant
concepts related to the phase-1 project andalso for providing support and
encouragement throughout the process.

3
Agro System Development

ABSTRACT

In general, agriculture is the backbone of India and also plays an important role in
Indian economy by providing a certain percentage of domestic product to ensure
the food security. But now-a-days, food production and prediction is getting
depleted due to unnatural climatic changes, which will adversely affect the
economy of farmers by getting a poor yield and also help the farmers to remain
less familiar in forecasting the future crops. This project helps the beginner farmer
in such a way to guide them for sowing the reasonable crops by deploying machine
learning, one of the advanced technologies in crop prediction.Supervised learning
algorithm puts forth in the way to achieve it. The data of the crops are collected
here, with the appropriate parameters like temperature, humidity and moisture
content, which helps the crops to achieve a successful growth. In addition to this,
an user-interface will be developed. The users are encouraged to enter parameters
like temperature and NPK values, based on this input information the suitable crop
will be detected by the system.

4
Agro System Development

TABLE OF CONTENTS

Topic Page.no
1. Introduction 6
2. Problem Statement 7
3. Objectives 8
4. Methodology 9-10
5. Literature Survey 11-17
6. System Requirements and specification 18-21
6.1 Functional Requirement 18-20
6.2 Non Functional Requirement 20-21
7. System Architecture 22-24
8. Use case diagram 25-26
9. Sequence diagram 27
10.Context Diagram 28
11.Activity Diagram 29
12.Class Diagram 30-31
13.Data flow diagram 31-33

5
Agro System Development

1. INTRODUCTION

Agriculture is an important sector for Indianeconomy andalsohuman future. It also


contributes a large portionof employment.As the time passes the needfor
production has been increasing exponentially.So, the deployment of one of the
recentadvancementsin technology such as, Machine learning is one among the
answer for predicting the crop with relation to atmospheric & soil parameter of the
agricultural land. Since, now-a-day’s climatic conditions aren’t predictable like
decades ago. It is changing day by day due to globalization. Hence, the farmers are
facing difficulties in forecasting the weather and crops based on climate data. In
recent years the advancement of Machine Learning plays a crucial role in every
field including agriculture, here the crop-prediction process done with
consolidating the preceding data and the present data of a particular month to prove
the accuracy of climatic data. Machine learning is a methodology of analyzing
information to automatize the given model and a branch of AI depend on the
concept that systems will study from data to form selections with minimal human
intervention. The aim of the project is to results to increase the yield and profit for
producers. The proposed system concentrates on yield, weather predictions and
crop type. The dataset istaken on agriculture statistics. This dataset is used for
experimental basis. After the data processing it isdivided into training and testing
and the best suitable algorithm will be chosen after obtaining the accuracy-score.

6
Agro System Development

2. PROBLEM STATEMENT

In general, agriculture is the backbone of India and also plays an important role
inIndian economy by providing a certain percentage of domestic product to ensure
the foodsecurity. Selection of crop is an important issue for agriculture planning. It
depends on variousparameters such as product rate, market prize and government
policies. Many researchersstudied prediction of yield, rates of crop, prediction of
weather, soil classification and cropclassification for agriculture planning using
statistics method or machine learning techniques.If there's more than one options to
plant a crop at a time using limited land resource thenselection of crop is a
puzzle.However, regrettable is the yield per hectare of crops in comparison to
internationalstandards. This is one of the possible causes for a higher suicide rate
among marginal farmersin India. However, rainfall is uncertain in India it is
complicated to predictthe rainfallaccurately. It is challenging to forecast the rainfall
for both summer and rainy season. We haveseen many cases in which farmers
facing problems due toheavy rainfall, flood and also due todrought, they are not
able to get the expectedoutcome.

7
Agro System Development

3.OBJECTIVES

This project aims at predicting the crop yield at a particular weather condition and
therebyrecommending suitable crops for that field. It involves the following steps.

● Collect the weather data, crop yield data, soil type data and the rainfall data and
mergethese datasets in a structured form and clean the data. Data Cleaning is done
to removeinaccurate, incomplete and unreasonable data that increases the quality
of the data andhence the overall productivity.

● Perform Exploratory Data Analysis (EDA) that helps in analyzing the complete
datasetand summarizing the main characteristics. It is used to discover patterns,
spot anomaliesand to get graphical representations of various attributes. Most
importantly, it tells us theimportance of each attribute, the dependence of each
attribute on the class attribute andother crucial information.

● Divide the analyzed crop data into training and testing sets and train the model
using thetraining data to predict the crop yield for given inputs.

● Compare various Algorithms by passing the analyzed dataset through them


andcalculating the error rate and accuracy for each. Choose the algorithm with the
highestaccuracy and lowest error rate.

● Test the implemented system to check for accuracy and failures.

8
Agro System Development

4.METHODOLOGY

This involves 3 Phases,

 Identification of suitable Crop.

 Identification of suitable climate.

 Identification of appropriate method.

This will be done by collecting information like Soil type, climate, place etc. by the
farmers using a mobile application. Application will be developed using Android
Studio platform. The datasets for respective phases will be collected and Suitable
crop, climate and method will be predicted based on the algorithm which has the
highest accuracy among the tested algorithms like Naïve Bayes, Random-forest,
Artificial Neural Network, Support Vector Machine, K-Nearest Neighbors
and Decision tree.

Random Forest is a classifier that contains a number of decision trees on various


subsets of the given dataset and takes the average to improve the predictive
accuracy of that dataset.

SVM algorithm is to create the best line or decision boundary that can segregate n-
dimensional space into classes so that we can easily put the new data point in the
correct category in thefuture. This best decision boundary is called a hyperplane.
SVM chooses the extremepoints/vectors that help in creating the hyperplane.

The KNN algorithm aim is to locate all of the closest neighbors around a new
unknown datapoint in order to figure out what class it belongs to. It’s a distance-
based approach.

9
Agro System Development

Naïve Bayes Classifier is one of the simple and most effective Classification
algorithms whichhelps in building the fast machine learning models that can make
quick predictions. It predicts on the basis of the probability of an object.

Collection of dataset

Pre-processing

Handling missing data

Feature Reduction
Prediction
Training Testing data Model
data 70% 30%
Graphs and
Result

10
Agro System Development

5.LITERATURE SURVEY

A literature survey or a literature review in a project report shows the


variousanalyses and research made in the field of interest and the results already
published,taking into account the various parameters of the project and the extent
of the project.Literature survey is mainly carried out in order to analyze the
background of thecurrentproject which helps to find out flaws in the existing
system & guides onwhich unsolvedproblems we can work out. So, the following
topics not only illustrate the backgroundof the project but also uncover the
problems and flawswhich motivated to proposesolutions and work on this project.

A literature survey is a text of a scholarly paper, which includes the


currentknowledge including substantive findings, as well as theoretical and
methodologicalcontributions to a particular topic. Literature reviews use secondary
sources, and do notreport new or original experimental work. Most often
associated with academicoriented literature, such as a thesis, dissertation or a peer-
reviewed journal article, aliterature review usually precedes the methodology and
results sectional though thisisnot always the case. Literature reviews are also
common in are search proposal orprospectus (the document that is approved before
a student formally begins adissertation or thesis). Its main goals are to situate the
current study within the body ofliterature and to provide context for the particular
reader. Literature reviews arebasisfor researching nearly every academic field.

11
Agro System Development

A literature survey includes the following:

• Existing theories about the topic which are accepted universally.

• Books written on the topic, both generic and specific.

• Research done in the field usually in the order of oldest to latest.

• Challenges being faced and on-going work, if available.

Literature survey describes about the existing work on the given project. It
dealswith the problem associated with the existing system and also gives user a
clearknowledge on how to deal with the existing problems and how to provide
solutiontothe existing problems.

Objectives of Literature Survey:

• Learning the definitions of the concepts.

• Access to latest approaches, methods and theories.

• Discovering research topics based on the existing research

• Concentrate on your own field of expertise– Even if another field uses

the same words, they usually mean completely.

• It improves the quality of the literature survey to exclude sidetracks–Remember


to explicate what is excluded.

12
Agro System Development

01."Crop Yield Prediction based on Indian Agriculture using Machine


Learning”,

Author: Potnuru Sai Nishant1, Pinapa Sai Venkat et al.(2020 International


Conference for Emerging Technology (INCET)Belgaum, India. Jun 5-7, 2020)

It predicts the yieldof almost all kindsof crops that are planted in India. They
predicted the yield of thecrop in which year he or shewants to, by the usage of
simple parameters like State,district, season and area. The paper usesregression
techniques like Kernel Ridge, Lasso and ENet algorithms to predict the yield.
Theoutput has been shown in a web application, but they failed in building an
application wherethe farmers can use it as app and converting the whole system in
their regional language.

02 .The paper "Machine Learning based Rainfall Prediction" R.Kingsy Grace


andB.Suganyapredict the climatic conditions in any country. This paper proposes a
rainfall prediction modelusing Multiple Linear Regression (MLR) for Indian
dataset. The Mean Square Error(MSE),accuracy, correlation are the parameters
used to validate the proposed model. Theyfound that, it is demanding responsibility
of meteorological department to predict the frequencyof rainfall with uncertainty.
And they found it complicated to predict the rainfall accuratelywith changing
climatic conditions. It is challenging to forecast the rainfall for both summer and
winter.

03.The paper titled "Crop Prediction Using Machine Learning" M.Kalimuthu,


P.Vaishnaviand M.Kishore predicted the crop using Naive Bayes algorithm here
theseed data of the cropsare collected with the appropriate parameters like
temperature, humidity and moisture content.And they have developed an
application for collecting information from the farmers. Thus, theyhave failed to

13
Agro System Development

implement fewconcepts like suggesting fertilizers and suitable guidelines


forcropland and cropsfor the given input.

04.The paper titled "Machine Learning based Rainfall Prediction" R. Kings


Grace and B.Suganya proposed a rainfall prediction model using Multiple
LinearRegression for Indiandataset. This paper uses statistics model i.e. Multiple
Linear Regression model and the resultis plotted as graph and algorithms like QPF,
LR, MLR are compared with parameters MSE,RMSE and CORRELATION. This
paper does not take any inputs from the users and doesn'thave web applications. So
we will develop an application which takes user inputs that provideaccurate results.

05.In the paper "Crop Selection Method to Maximize Crop Yield Rate
usingMachine learningtechniques" Rakesh Kumar, M.P. Singh, Prabhat Kumar,
J.P. Singh proposed a method namedCrop Selection Method to solve Crop
selection problem, and maximize net yield rate of cropover season. This paper
takes crop, their sowing time, plantation days and predicted yield ratefor the season
as input and finds a sequence of crops whose production per day are maximumover
season. The algorithms used in this paper are ANN, SVM, KNN, Decision tree
learning,Random Forest, Gradient Boosted Decision tree, Regularized Greedy
Forest. Here the userinterface is not built to take inputs from the users. We will
implement this in our project.

06.The paper "Supervised Machine learning Approach for Crop Yield


Prediction inAgriculture Sector" Dr. Y. Jeevan Nagendra Kumar, V. Spandana,
V. S. Vaishnavi,K.Neha,V.G.R.R Devi predicted the yield of the crop from past
historical data which includes factorssuch as temperature, humidity, ph, rainfall
and crop which will becultivated in the field weatherconditions. This project is
done based on Random Forest algorithm. This research work can beenhanced to
the high level by building a recommender system of agriculture production
14
Agro System Development

forfarmers. By which farmer canmake their own decisions like which season which
crop shouldsow so that they can get better profit.

07.In this paper titled “Rianfall Prediction using Machine Learning and Deep
Learning”,CMAK ZeelanBasha ,Nagulla Bhavana , Ponduru Bhavya , Sowmya V,
predicts the rainfallusing regression techniques such as Artificial Neural-
Network(ANN),Support-Vector-Machines(SVM),ARIMA(auto-regression
integrated moving average),Deep Learningtechniques such as Multilayer
Perceptron and Auto-Encoders. This paper provides a study ofdifferent types of
methodologies used to forecast and predict rainfall and issues that could befound
when applying different approaches to forecasting rainfall.

08.In this paper titled “Rainfall Prediction based on 100 years of Meteorological
Data”,SandeepKumarMohapatra, Anamika Upadhyay,Channabasava Gola,
predicts the rainfall onthe data collected for wet day frequency, precipitation and
rainfall for the years ranging from1901-2002 of Bangalore, India. This paper uses
the techniques like weather prediction, Datamining, Linear Regression to predict
the rainfall. This paper used fixed sampling of the inputdata set and another
method for K-fold cross validation techniques.

09. In this paper titled “Rainfall Prediction: Accuracy Enhancement


UsingMachine-Learning and ForecastingTechniques”,UrmayShah, SanjayGarg,
NehaSisodiya, NitantDube, ShashikantSharma, predicts the rainfall. This paper
uses Machine Learning techniques like a decision tree,KNN,ARIMA,SVR were
applied on the partitioned data. Empirical results show ARIMA formaximum
temperature, Neural Network for minimum temperature and SVR for
relativehumidity.

15
Agro System Development

10. In the paper “Crop Recommender System Using Machine Learning


Approach” Shilpa Mangesh Pande, Dr.Premkumar Ramesh, Anmol, B.R
Aishwarya and Karuna Rohilla This paper provides connectivity to farmers via a
mobile application. GPS helps to identify the user location. The user provides the
area & soil type as input. Machine learning algorithms allow choosing the most
profitable crop list or predicting the crop yield for a user-selected crop.The
functionality to be implemented is to provide the correct type of fertilizer for the
givencrop and location. In this model they considered only Karnataka and
Maharashtra statesdatasets.

11.The paper titled “Machine Learning convergence for weather based crop
selection”,SonalJain, Dharavath Ramesh, proposed a crop selection method to
maximize crop yield based onweather and soil parameters. It also suggests the
proper sowing time for suitable crops usingseasonal weather forecasting. Machine
learning algorithms such as Recurrent neural networkis used for weather
prediction, and Random-forest classification algorithmisused to selectsuitable
crops. The result of proposed weather forecasting technique is compared
withconventional Artificial neural network. This classification model is trained by
considering theweather and soil parameters of agro-climatic zones of only
Telangana state. The datasetcontains January 2014 to September 2019 data of
crops.

12.The paper titled “Crop Yield Prediction using Machine Learning”


Algorithm,D.Jayanarayana Reddy, Dr. M Rudhrakumar created an accurate and
efficient model for crop classification such as crop yield estimation based on the
weather, crop disease, classification of crops based on the growing phase etc., This
paper explores various ML techniques utilized in the field of crop yield estimation
and provided a detailed analysis in terms of accuracy using the techniques. Most of

16
Agro System Development

the existing models utilized Neural networks, random forests, KNN regression
techniques for CYP and a variety of ML techniques were also used for best
prediction. From the studies most of the common algorithms used were CNN,
LSTM, DNN algorithms but still improvement was still required further in CYP.
The present research shows several existing models that consider elements such as
temperature, weather condition, performing models for the effective crop yield
prediction.

17
Agro System Development

6.SYSTEM REQUIREMENTS SPECIFICATION

A software requirements specification (SRS) is a description of a software system


to be developed. It lays out functional and nonfunctional requirements, and may
include a set of use cases that describe user interactions that the software must
provide. It is very important in a SRS to list out the requirements and how to meet
them.Doing this also enables us to find out the limitations and risks early on.

FUNCTIONAL REQUIREMENTS:

A Functional Requirement is a description of the service that the software must


offer. Itdescribes a software system or its component. A function is nothing but
inputs to the softwaresystem, its behavior, and outputs. It can be a calculation, data
manipulation, business process,user interaction, or any other specific functionality
which defines what function a system islikely to perform. In software engineering
and systems engineering, a Functional Requirementcan range from the high-level
abstract statement of the sender's necessity to detailedmathematical functional
requirement specifications. Functional software requirements helpto capture the
intended behaviour of the system.

Benefits of functional requirements:

 A functional requirement document helps us to define the functionality of a


system orone of its subsystems.

 Functional requirements along with requirement analysis help identify missing

18
Agro System Development

requirements. They help clearly define the expected system service and behavior.

 Errors caught in the Functional requirement gathering stage are the cheapest to
fix.

 Support user goals, tasks, or activities.

Basic requirements:

Data collection: The dataset used in this project is the data collected from
reliablewebsites and merged to achieve the desired data set.

Data Preprocessing: The purpose of preprocessing is to convert raw data into a


form thatfits machine learning. Structured and clean data allows a data scientist to
get more preciseresults from an applied machine learning model. The
techniqueincludes data formatting,cleaning, and sampling. Here, data pre-
processing focuses on finding the attributes withnull values or invalid values and
finding the relationships between various attributes aswell. Data Pre-processing
also helps in finding out the impact of each parameter on thetarget parameter. To
preprocess our datasets we used EDA methodology. All the invalidand null values
were handled by removing that record or giving the default value of thatparticular
attribute based on its importance.

Dataset splitting: A dataset used for machine learning should be partitioned into
twosubsets — training and test sets. We split the dataset into two with a split ratio
of 80%i.e., in 100 records 80 records were a part of the training set and remaining
20 recordswere a part of the test set.

Model training: After a data scientist has preprocessed the collected data and
splitit intotrain and test can proceed with a model training. This process

19
Agro System Development

entails―feeding‖ thealgorithm with training data. An algorithm will process data


and output a model that isable to find a target value (attribute) in new data an
answer you want to get a predictiveanalysis. The purpose of model training is to
develop a model. We trained our modelusing the various algorithms. On training
the model it predicts the yield on givingthe other attributes of the dataset as input.

Model evaluation and testing: The goal of this step is to develop the simplest
modelable to formulate a target value fast and well enough. A data scientist can
achieve thisgoal through model tuning. That‘s the optimization of model
parameters to achieve analgorithm‘s best performance.

NON-FUNCTIONAL REQUIREMENTS:

Non-Functional Requirement (NFR) specifies the quality attribute of a software


system.They judge the software system based on Responsiveness, Usability,
Security, Portability andother non-functional standards that are critical to the
success of the software system. Failing tomeet non-functional requirements can
result in systems that fail to satisfy user needs. Non-functional Requirements
allows us to impose constraints or restrictions on the design of thesystem across the
various agile backlogs.They specify the criteria that can be used to judge
theoperation of a system rather than specific behaviours. They may relate to
emergent systemproperties such as reliability, response time and store occupancy.
Non-functional requirementsarise through the user needs, because of budget
constraints, organizational policies, the need forinteroperability with other software
and hardware systems or because of external factors suchas: - Product
Requirements, Organizational Requirements, User Requirements, Basic
OperationalRequirement,etc.

20
Agro System Development

Benefits of Non-Functional Requirements:

 The nonfunctional requirements ensure the software system follows legal and
compliancerules.

 They ensure the reliability, availability, and performance of the software system.

 They ensure good user experience and ease of operating the software.

 They help in formulating security policy of the software system.

HARDWARE REQUIREMENTS:

 System: intel i5

 Hard Disk: 120 GB

 Monitor: 15’’ LED

 Input Devices: Keyboard, Mouse

 RAM: 8 GB

SOFTWARE REQUIREMENTS:

 Operating system: Windows 10,64 bit.

 Coding Language: Python3.6

 Tools: Anaconda, Jupyter notebook or pycharm.

 Front end: TKinter.

21
Agro System Development

7.SYSTEM ARCHITECTURE

Architecture diagrams can help system designers and developers visualize the
high-level, overall structure of their system or application for the purpose of
ensuring the system meets their users' needs. They can also be used to describe
patterns that are used throughout the design. It's somewhat like a blueprint that can
be used as a guide for the convenience of discussing, improving, and following
among a team.

Rainfall Prediction Model:

Data Mining

Regression Algorithm
Bayesian 75%

User Data Collection

Month Year

Bayesian Model

Rainfall in cm^3

22
Agro System Development

Fig shows the system architecture of rainfall prediction. The first step is data
mining. Here we extract the useful information from the dataset for testing and
training. Missing values can be handled by deleting the rows of columns having
null values. And null values can be replaced by appropriate values using fillna
method. And after feature reduction data is divided into training data and testing
data.

Regression algorithm:

As we are predicting continuous numerical values, we use regression algorithm.


Here we are considering Linear regression, Random-forest, Bayesian regression
and Support vector machine regression algorithms for testing and training. We will
consider the algorithm which gives highest accuracy than others for predicting
rainfall.

User data collection-In the next step we collect required data from user for
predicting rainfall. Here for user interface we are using Tkinter a GUI(Graphical
User Interface) toolkit.

 We provide collected data as input to the trained model for prediction.


 We will get predicted rainfall, which will be used as input for crop
prediction model.

23
Agro System Development

Crop prediction model:

Data Mining

Classification Algorithm

Rainfall Prediction Model


User Data Collection

Predicted Rainfall
N P K PH

Class Model

Crop Predicted

Technologies can be
used

 The first step is data mining it is same as explained in the rainfall prediction
model.
 Next we are using classification algorithms. As we identity the category of a
given dataset.

24
Agro System Development

 In the next step we will collect inputs from the user. And the predicted
rainfall is given as one of the inputs.

Classification models:

In the next step the collected inputs will be given to classification model. Here we
considered Logistic regression, Decision tree and Random forest algorithm. In
these algorithms we will choose the best algorithm with good accuracy score and
thus crop will be predicted. Further the predicted crop is used to identify the
suitable methods or technologies that can be used for growing the particular crop.

8.USE CASE DIAGRAM:

A use case is a methodology used in system analysis to identify, clarify and


organize system requirements. The use case is made up of a set of possible
sequences of interactions between systems and users in a particular environment
and related to aparticular goal. A use case document can help the development
team identify and understand where errors may occur during a transaction so they
can resolve them.

25
Agro System Development

User Data

Load Dataset

Read Data

Data Mining

Apply Algorithm
SYSTE
Predicts Crop

Identify suitable
Technologies &
Methods

USER Result

The figure represents the actor and their functional requirements provided by
thesystem.The functionalities provided by the system are represented in ovals.
Thearrows represent the dependencies and visibility of the functionalities.The user
have to provide input data and get predicted crop, required technologies as output.

26
Agro System Development

9.SEQUENCE DIAGRAM

TRAINED MODEL TRAINED MO


USER INTERFACE
FOR RAINFALL FOR CROP

Month ,State
Month, Year Responded prediction
N, P, K, PH of Rainfall

N, P, K, PH
Recommended
Crop

Responded
Identified
prediction of
Technology &
Crop
Method

 In the sequence diagram we have 4 blocks i.e user,interface, trained model


for rainfall prediction and trained model for crop prediction.

27
Agro System Development

 In the first step the user will provide input data such as month,state, NPK
values and ph.Tothe system by the interface. Then the interface will provide
these inputs to trained models.
 The inputs moth and state will be given to rainfall prediction model this
model will provide the predicted rainfall as input to crop prediction model.
And the crop prediction model will get other inputs by the interface.
 After collecting the inputs model will predict the crop. By that crop the
method and technology will be identified.Then both will be given as output
for the user through the interface.

10.CONTEXT DIAGRAM

Inputs
(N, P, K, PH)
AGRO
USER SYSTEM
Predicted
Crop &
Identified
Method/
Technology

28
Agro System Development

 Context diagram contains only one process node that generalizes the
function of the entire system in relationship with external entities.
 Here we have provided the overview of our project. That is the user will
provide the inputs like NPK values ph, year and month to the system and the
system will provide the predicted crop and identified method to the user.

11.ACTIVITY DIAGRAM

An activity diagram is a behavioral diagram i.e. it depicts the behavior of a system.


An activity diagram portrays the control flow from a start point to a finish point
showing the various decision paths that exist while the activity is being executed.

29
Agro System Development

SYSTEM STARTS

PROVIDE INPUT

RAINFALL & CROP


Error
PREDICTION

SUCCESS
YES

IDENTIFY METHOD /
TECHNOLOGY

OUTPUT RESULT

In the Activity diagram when the system has started, the user will be provided a
user interface to provide inputs after collecting the inputs will be provided to
prediction models if the prediction is successful then using the predicted crop the
method and technology will be identified and that will be provided as output. If

30
Agro System Development

any error has occurred during the prediction the control will be redirected to user
interface.

12.CLASS DIAGRAM

It is a type of static structure diagram that describes the structure of a system by


showing the system's classes, their attributes, operations (or methods), and the
relationships among objects.

We have two classes i.e user and system.

In user we have variables to store the input values that will be given by the user.
And the user will call the predict() function through user interface.

And for system:

We will be having a dataset which is stored as .CSV file

And in the system, we use read dataset method for loading the dataset. Train model
() for training the rainfall and crop prediction models

Predict rainfall () and predict crop() methods for predicting rainfall and croy
respectively..

And user and system are interrelated user provide input the system and the system
will provide the output.

31
Agro System Development

SYSTEM

Dataset : .csv

Read dataset()
Train model()
Predict Rainfall()
Predict crop()

13.DATA-FLOW DIAGRAM

A data-flow diagram is a way of representing a flow of data through a process or


asystem. The DFD also provides information about the outputs and inputs of each
entity and the process itself.

LEVEL 0:

It's a basic overview of the whole system.

Here we provide inputs to the crop prediction model and the model will predict the
crop and identifies the suitable technology and method.

LEVEL 1:

32
Agro System Development

The data set will be loaded and that will be preprocessed after preprocessing the
data will be selected and reduced. After reduction data will be provided to ML
algorithm for training the model.

LEVEL-0 0.1 PREDICTS


CROP PREDICT CROP,
INPUTS & USING IDENTIFY
DATASET RAMDOM TECHNOLOGY,
FOREST METHODS
LEVEL-1 1.2
LOAD 1.1
DATA
DATASET PREPROCE
SELECTION &
SS
REDUCTIION
1.3
ML
ALGORITHM
TRAINED
MODEL

33
Agro System Development

LEVEL 2:
User input will be provided to the trained modelfirstly the rainfall prediction model
then the predicted rainfall and other inputs will be provided to crop prediction. We
get the predicted crop as the final output.

LEVEL-2

USER INPUT 2.1


TRAINED MODEL

2.2
RAINFALL PREDICT
MODEL

2.3
CROP PREDICTION
MODEL

PREDICTED CROP

34

You might also like