You are on page 1of 42

Decision Making Model Using ML for Agriculture 1

CHAPTER 1

INTRODUCTION

1.1 Aim of the Project

The project title “Participation of Machine Learning in Plantation in Agriculture

Using Decision Making Model” is web application which gives the information of

success rate of cultivation of individual crops to the end users which are cultivated in

various regions. The purpose of this web application is a good effort to improve the

agriculture system.

1.2 Description of the Project

As mentioned in the abstract this project is about helping the agricultural field by

giving good ideas to the farmers for cultivation of crops. Now a days farmers are facing

some major and common problems like how much money to invest, where to invest and

when to invest and so on for getting more profit in the business. This project trying to

overcome these problems by creating a decision making model using machine learning

which can predict and give good ideas and suggestions to the end users(farmers). And by

using this project, farmers will easily come to know where to invest their precious money

and how to do it and as well as where to invest the money based on individual crops for

getting more profit.

The above mentioned model will predict the output based on the input data which can

be extracted from the past years. Here the aim of this project is trying to design a model

in machine learning which can be used to get the information about the cost, weather,

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 2

water resources, and soil and so on of the individual crop for the cultivation of that crop.

And this model will be design by using machine learning algorithms such as Linear

Regression, KNN and Random Forest (which works on decision tress), these algorithms

will help the model to predict the most accurate results by analyzing the input data which

is given to model and the output can be seen in the browser which can be implemented by

using python Django web framework.

1.3 Profile of the Company

The company “TECHCITI” understands the value of providing or giving the good

and feasible solutions for the business. Company provides a lot of services to build a

solution that is good for the business needs. Every business requires suggestions and

support irrespective of the size. Company have good technical experience for about more

than five years and also have the Knowledge of IT Services. Company provide free

consultation service to set up and construct the requirements. Company is always will be

there and stay from initial step (choosing of product) to the last step (installation).

The company having more than 50 employees and till now they are provided

internships training for more than 800 students. The trained students after their

completion of internship period they will be assign to some real world projects and they

are informed to complete it within a given time. The company was started before five

years with the two resource persons.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 3

CHAPTER 2

LITERATURE SURVEY

2.1 EXISTING AND PROPOSED SYSTEM

2.1.1 Existing System

As we know farmers still going for traditional methods for future prediction of crops

cultivation, production and management even though we have some advance techniques

in agricultural science and their aim is to remove these old techniques and methods

instead they are looking to improve it some advance level. Most of the research persons

were done the research to solve these kind of problems and they presented similar kind

of ideas but not implemented completely.

2.1.2 Proposed System

As I mentioned above my aim about this project is to help the agricultural science

and the end users (farmers) and solving the major problem of profit loss or cost loss by

creating a good decision making model. For doing this I have referred some research

papers from IEEE and a research paper presented by 3 persons belonging to the

department of computer engineering [1] referred to understand the existing system and

writing the abstract part of the project. My approach in this project is different as

compared to them and technology is also differs. [2] referred to design the architecture of

the system and to write the context diagrams for this project. I have created datasets also

for giving as input for a model to get the good results.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 4

2.2 FEASIBILTY STUDY


Feasibility is nothing but determining or finding the project is doing well or not.

The steps involves in this process is called feasibility study. In other words it is the

method of processing the functional requirements of user and uses of the resources and

managing of those resources with the time. This study is used to understand and analyse

whether the created system is working feasible or not.

Once the requirement specification is done then development will be moved to next

level that is design. In design phase lots of solutions will be presented. But the best

solution among all the solutions will be chosen, this is the biggest responsibility of the

developer for the further development.

2.2.1 Technical Feasibility

As name indicates it consider software equipment and tells about the technical

feasibility like whether the system fulfilling the user needs by giving desire and expected

outputs, whether the system running in all the environments. And it gives response time

of the system and the speed of the process. Here developer have to make sure the

programming languages that he chosen is to be understand to a common or normal

person. Here it is very important that, whatever decision the developer takes, he make

sure that it should be flexible, that means front and backend should be flexible and it

should work and support in all the environment.

2.2.2 Economic Feasibility

Economic feasibility is the most commonly used method or technique for analysing

or estimate the effectiveness of a proposed system. Further it is also known as fare/profit

analysis. The approach is to calculate the profit and the savings and proposed system will

be compare with the fare. The decision of design and implementation of the system is

taken and made if there is any chance of being selected. There will be a continuous

attempt that boost the accuracy in every step or level of system life cycle.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 5

2.2.3 Operational Feasibility

As name indicates operational is nothing it is related to the action or performance or

behaviour of the system. Here some points will be taken under consideration and those

are given below.

1. What kind of changes will be introduce with the system.

2. What kind of professionalism and new talent is required.

3. Whether the existing staff persons have these talent or not.

4. If they don’t have, then are they going to be trained.

once the system is designed and completed then it will be taken for use. The once

who wants to use the system should have at least some knowledge about how to use it.

The user should be trained at least basic level.

2.3 RESEARCH PAPERS


The project titled “Participation of Machine Learning in Plantation in Agriculture

using Decision Making Pattern” is a real world and research based project. This project

idea is come to an account after reading some research papers from the different source.

More than 25 research papers presented till now related to my project and all are looking

to solve the same problem but the platform they chosen are different from one person to

the other person because some people are looking to the solve problem using machine

learning by creating prediction models which can predict the crop production success rate

at the given region based on the past year’s agricultural crop production data and some

are trying to use another booming technology in the market that is IOT and some are

choosing mobile application and so on. The referred papers are mentioned in bibliography

chapter in references part.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 6

2.4 TOOLS AND TECHNOLOGIES USED


2.4.1 Django

Django is an open source and web framework present in python which is developed

and maintain by DSF(Django Software Foundation). Now a days django widely in used

because of its more built in functionalities. There are some famous and well-known

companies and apps are using django for the development of their websites and those

companies and apps are Google, Instagram, Disqus, Spotify, You Tube, Pinterest, .It is

used in web development in python. It support templates and static files that means you

can easily render the HTML pages by putting all the HTML files in the directory called

‘templates’ and similarly you can place all the files related to styles like CSS and JS will

be placed inside the directory called ‘static’. In this project django is used for the front

end development. Further django provide more features as compared to other frameworks

and those features are given below.

1. Built in localhost server

2. Built in administration facility

3. High security

4. Rapid development

5. Outstanding documentation

2.4.2 Bootstrap 4

Bootstrap is an open source framework used to develop the responsive web

applications or responsive designs. Responsive means application should be runs on

smaller screens like mobile phones and tablets. Every element of the HTML document

get stacked when the page get smaller or minimized. By default bootstrap takes 12

columns of width with equal separation of the columns that means every column having

same size. But you can alter the default values and you can make layouts, design

according to your requirements using <span> tag.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 7

Bootstrap provide grid system for all kind of devices such as extra small, small,

medium, large, extra-large which can help to run the app on every devices. Further it

provide some stylish buttons, forms, tables and so on. Bootstrap 4 is the newest version

with some additional features compare to previous versions. In this project bootstrap 4 is

used for the front development along with the django framework.

2.4.3 NumPy

NumPy is the library for the python language which provide arrays and matrices for

the storing the large data. It provides and support high-level and more mathematical

functions which works on these numpy arrays and matrices.

2.4.4 Pandas

Pandas is the library for the python language which is used for data manipulation and

analysis of data. It provide some data structures and operations for the manipulation and

analysis.

2.4.5 Scikit-learn

Scikit-learn also known as skleran is a library and free software for the machine

learning. It is used to invoke and implement all the machine learning algorithms such as

regression, classification, random forest, k-means, clustering, gradient boosting, support

vector machine and so on.

2.4.6 Matplotlib

Matplotlib is an plotting library for python language and it used to plot the result in a

graphical form. It allow us to plot Line Plot, Histogram, Scatter Plot, 3D Plot and so on.

And it is written in python. There are two graphs plotted in this project one is related to

net worth information and another one is related to import and export information of the

individual crops. And both graphs are given below.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 8

Figure 2.1:Graph for the values of net worth of the crops

Figure 2.2:Graph for the values of import and export of the crops

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 9

2.5 HARDWARE AND SOFTWARE REQUIREMENTS

2.5.1 Hardware Requirements

1 RAM 4 GB/8 GB for faster output.

2 Hard Disk 500 GB

3 Miro Processor 2.0 GHz

4 Micro Processor Type Core i3/Core i5

5 Any Desktop or Laptop systems with high level configuration

2.4.2 Software Requirements

1 OS(Operating System) Windows XP/7/10

2 Programming Language Python 3x

3 Front End or Web HTML 5, CSS, BOOTSTRAP4

Technologies

4 Web Frameworks Django 2x

5 IDE(Integrated PyCharm IDE Community Edition 2018.3.3

Devlopment

Environtment)

6 APIs NumPy, Pandas, Sklearn, Matlib, Seaborn

7 Technology used Machine Learning

8 Database SQLite

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 10

CHAPTER 3

SOFTWARE REQUIREMENT SPECIFICATION


Software Requirement Specification (SRS) is a completely preserve and saved

catalogue which is maintained by the developer. It gives detailed elucidation about the

software system which is developed with its functional requirements and also

non-functional requirements. It may also contains some use cases which tells about the

customer interactions.

Software Requirement Specification provide the base for the agreement between

client and suppliers for how should the software system functionally behave. It also

reduce the time of redesigning. And it also tells about the estimation of product costs and

gives information about risks.

3.1 USERS
In this project, there are mainly three users namely.

1. Admin

2. State Authority

3. User(farmer)

3.1.1 Admin

In this project, this module is created for the administrative user or admin of the

application. The job of the admin is to maintain all the modules. The admin can add the

users and he can create the groups of the users. Similarly, in other hand he can remove or

delete the user and also remove or delete groups too. Further admin add the data to

database as well as delete the data from the database. By looking at all these thing you

can say that admin will do crude operations with the database.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 11

3.1.2 State Authority

In this project, this module is created for the state officer or state authority. When the

state authority do registration to the system then he will allowed to login to the system

with the user id/name and password which is given by the state authority during signup or

registration.

Once he done with the signup and login he can use the system. The main job of state

authority is to adding the data into the system which is related to crop production in all

over the state with the respective district.

The values will be the area, production per area, net worth of the crop and the values

of import and export of the crop. There are three upload pages for adding the data. So, he

has to add all the fields carefully for the accurate results.

3.1.3 Farmer(End User)

In this project, this module is created for the end user or farmers. Here end user can

access the system by registering or signing up to the system with the necessary

information.

Once the end user done with the registration, then he will be allowed for the login.

User can login into the system by using username or id and password which is given by

the user during registration or singing up to the system.

The end user can access the information of about the success rate of individual crop

which is cultivated at different regions in the whole state and know the current weather

condition of that region. And also know the values of production, imports, exports,

production per square area and gross production value.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 12

3.2 FUNCTIONAL REQUIREMENTS


Functional requirements of the system tells about the functional part of the system

and it contains computation, practical details, manipulation and operations on data and

some more unique functionalities of the system. It actually tells about the system what

supposed do. Here we can see how and what the kind of outputs and results are

generating and what kind of services it providing to the end users.

The functional requirements of the system tells about the cost of the system and it

also tells about reliability of the system that means the services provided by the system is

fulfilling the user needs or not and the output which is getting from the system is

expected output or not will be studied.

It also gives the complete functionality of the subsystems of a system and a document

of high level statements will be maintained in which all the above points will be

completely and clearly explained in detail. The document may include some key points or

functional requirements such as safety and security, quality, manufacturability, usability,

performance, reliability and environmental friendliness and so on.

In this project, if you want to find the functional requirements that can be listed one

by one and those are extracting the minimal data from huge datasets, predicting value of

production per sq.area, determining the weather conditions for the current time of the

given region and predicting the success rate of individual crop production at different

geographical locations and so on. All the above mentioned points are called outputs or

services of the system. These are few services which the end user can get from this

system or from this project.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 13

3.3 NON FUNCTIONAL REQUIREMENTS


Non functional requirements of the system is nothing but it describe the standard

which is used to conclude the operations of the system. In other words non functional

requirements of the system is defined as the constraints, rules, guidelines and the

procedure applied on the functional requirements is called non functional requirements. It

tells about how a system is should be present, that means it gives the plan about the

architecture of the system. It is also called as “quality attributes” and it is divided into two

types, first one is execution and another one is evolution.

The first type of non functional requirements that is execution contains security and

safety, usability which can be seen at the run time. Whereas the second type contains

scalability, extensibility, maintenance and testing. Which are merged in the fixed

structure of the system. in this project, if you want to figure out some non functional

requirements yes you can do that and those are connecting to internet, initiating the

localhost server, creating virtual environment for the project and so on.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 14

CHAPTER 4

SYSTEM DESIGN
4.1 SYSTEM PERSPECTIVE
System perspective as name indicates it is an view or attitude or ability of thinking

about the problems and conclusion with a strong reason without amplifying them. Here

every single behaviour of the system consider as whole. System behaviour nothing but the

actions performed by the system. In simple and other words outputs provided by the

system for the given inputs of the system.

There are mainly two modules in the system who is the responsible for the behaviour

of the system that is end user and state authority. Every end users has to registers

themselves to access the system and this the most common action performed by the

system. And the second one is updating the agricultural data or information which is done

by the state authority module. End users can’t get the outputs or they can’t see the

prediction success rate until the respective state authority did not upload the past years

production information of crops individually.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 15

4.2 CONTEXT DIAGRAM


The below diagram is also called as Data Flow Diagram(DFD) which gives the flow

of data from initial point to end point. In other words movement of data from one module

to other modules.

Admin

State ADD Weather


Lat_long
Auth Process 1 API

Prod_area

Linear Mean Regression


User Prediction
Average

Net_worth

Import_export

ADD ADD
Process 2 Process 3

Figure 4.1:Context Diagram

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 16

CHAPTER 5

DETAILED DESIGN
In this part we can be able to see the several diagrams which is related the this

system. And those diagrams are use-case diagram, activity diagram, collaboration

diagram, sequence diagram and entity relationship diagram of all the modules.

5.1 USE-CASE DIAGRAM


The use-case diagram is used to tell the actions performed by the user with the

system. Here user will be called as ‘actor’ and actions are nothing but the services

provided by the system is known as actions.

5.1.1 Use-Case Diagram for State_Authority Module

The given below diagram gives about the action performed by the state_authority

with the given system. The follwing actions are given in the use-case diagram of the

state_auth.

Figure 5.1:Use-Case Diagram of State_Auth

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 17

5.1.2 Use-Case Diagram for Admin Module

The below diagram tells about the actions performed by the admin with the system.

Those actions are given in the use-case diagram of the admin.

Figure 5.2:Use-Case Diagram of Admin

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 18

5.1.3 Use-Case Diagram for User Module

The below diagram shows the actions performed by the end user with the system.

Here end user will be actor who will do the actions.

Figure 5.3:Use-Case Diagram of User

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 19

5.2 SEQUENCE DIAGRAM


Sequence diagram is used to understand the relationship between one object to

another object and classes. This diagram also gives about the information exchange

among the objects.

Figure 5.4:Sequence Diagram

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 20

5.3 COLLABORATION DIAGRAM


The collaboration diagram is a graphical representation of interactions which takes

place between the objects inside the architecture.

Figure 5.5:Collaboration Diagram

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 21

5.4 ACTIVITY DIAGRAM


The activity diagram is another kind of diagram present in the ULM. Which shows

the vigorous features of the system. It tells about the change in the activities. Here the

activity is nothing but the operations.

5.4.1 Activity Diagram for Admin Module

The below diagram represents the flow of change in activities in admin module.

Figure 5.6:Activity Diagram of Admin

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 22

5.4.2 Activity Diagram for State_Authority Module

The below diagram gives the change in activities in the State_Authority module. So

that you can be able understand the flow of working of State_Authority module.

Figure 5.7:Activity Diagram of State_Auth

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 23

5.4.3 Activity Diagram for User Module

The below diagram represents the activity diagram of end user module. By looking at

below diagram you can came to know what are the activities takes place by end user.

Figure 5.8:Activity Diagram of User

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 24

5.5 DATABASE DESIGN


5.5.1 Database Tables

The database is very important for all the system, because if we want store any kind

of information related to the system then this can be done only when there is a database

created for the system. Usually database is used to store the information of all the users

which may include usernames and their passwords and so on. It is also helps to perform

crude operations. In this project database design did not included any primary key and

foreign key instead tables are created separately for storing the data and retrieving from

the database.

State Auth Register Table

The below table gives the complete database table structure of State_Auth for

Registration.

Form_field Type Length Remark

Email Varchar 60 Not Null

Password Varchar 50 Not Null

Username Varchar 20 Not Null

Authid Varchar 100 Not Null

Department Varchar 100 Not Null

Pancard Varchar 100 Not Null

Crop Varchar 100 Not Null

Address Varchar 100 Not Null

Gender Varchar 100 Not Null

Phone Varchar 100 Not Null

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 25

State_Auth firstdb1

The below table gives the database table design for storing the predicted values to the

database.

Form_field Type Length Remark

State Varchar 50 Not Null

District Varchar 50 Not Null

Crop Varchar 50 Not Null

Org Decimal 4 Not Null

Pred Decimal 4 Not Null

Production area Table

The below table represents the structure of table and its fields in database to store the

predicted values of production area and actual values of production area.

Form_field Type Length Remark

State Varchar 25 Not Null

District Varchar 25 Not Null

Crop Varchar 25 Not Null

Org_val Decimal 4 Not Null

Pred_val Decimal 4 Not Null

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 26

Netwoth Information Table

This table is made to store the values of gross productions in different types of

currency in the database.

Form_field Type Length Remark

Crop Varchar 15 Not Null

Gross Production Value Current Million US Dollar Decimal 4 Not Null

Net Production Value Constant 2004 2006 1000 Decimal 4 Not Null

Dollar

Gross Production Value Constant 2004 2006 Million Decimal 4 Not Null

Dollar SLC

Gross Production Value Current Million Dollar SLC Decimal 4 Not Null

Gross Production Value Constant 2004 2006 1000 Decimal 4 Not Null

Dollar

Gross Production Value Constant Million US Dollar Decimal 4 Not Null

Import and Export Information Table

This below table is constructed in the database to store the values of import and

export of individual crops into the database.

Form_field Type Length Remark

Crop Varchar 15 Not Null

Imports Decimal 4 Not Null

Exports Decimal 4 Not Null

Production Decimal 4 Not Null

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 27

imports_mean Decimal 4 Not Null

exports_mean Decimal 4 Not Null

production_mean Decimal 4 Not Null

End User Register Table

The below table gives the table structure and its fields in the database which is made

to store the data of end user when he do register for the first time.

Form_field Type Length Remark

emp_id Varchar 50 Not Null

Name Varchar 50 Not Null

Gender Varchar 50 Not Null

Email Varchar 50 Not Null

Password Varchar 50 Not Null

Phone Varchar 20 Not Null

ques_1_id Varchar 5 Not Null

ans_1 Varchar 50 Not Null

ques_2_id Varchar 5 Not Null

ans_2 Varchar 50 Not Null

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 28

5.5.2 Entity-Relationship Diagram

The given below figure represent the E-R diagram.

Figure 5.9:E-R Diagram

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 29

CHAPTER 6

IMPLEMENTATION
6.1 ABSTRACT CODE

def work(request):
if request.method=='POST':
area=request.POST['area'].upper()# here we are taken
area
crop=request.POST['crop'].capitalize()#and
perticuler crop

if(prod_area.objects.filter(crop=crop,district=area)).count(
)>=1:
#getting the atmosphere information
data=api_for_weather(area)
print('data is',data)
#getting the json details of the atmosphere
if 'cod' in data and data['cod']=='404':
coord,data=geocoding(area)
if data['status']['code']==200 and
data['status']['message']=='OK':
data=api_for_weather_2(coord[0],coord[1])
else:
return
render(request,'cultivo_main/error.html')

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 30

6.2 Screenshots
6.2.1 Admin Login Page

The below picture shows the admin login form where super users will login and

maintain the whole admin module.

Figure 6.1:Admin Login Page

6.2.2 Admin Control Page

The below image shows the admin page once a super user logs in page will be

redirected to the admin control page and it looks like as image is shown below.

Figure 6.2:Admin Control Page

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 31

6.2.3 State_Auth Login Page

The below snapshot gives the design of login in page for the state_auth module.

Figure 6.3:State_Auth Login Page

6.2.4 State_Auth Signup/Register Page

The below snapshot gives the design of Registration or Signup page for the

state_auth module.

Figure 6.4:State_Auth Signup/Register Page

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 32

Once the state authority is done with the register and login then the page will be

redirected to the data upload page. There are 3 upload pages so that the state authority has

to upload the data in all the upload pages which is taken from the filtered dataset in csv

format.

6.2.5 State_Auth Data Upload Page 1

The below snapshot gives the design of data upload page 1 for the state_auth module.

Figure 6.5:State_Auth Data Upload Page 1

6.2.6 State_Auth Data Upload Page 2

The below snapshot gives the design of data upload page 2 for the state_auth module.

Figure 6.6:State_Auth Data Upload Page 2

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 33

6.2.7 State_Auth Data Upload Page 3

The below snapshot gives the design of data upload page 3 for the state_auth module.

Figure 6.7:State_Auth Data Upload Page 3

6.2.8 End User Login Page

The below screenshot represents the login page for end users.

Figure 6.8:End User Login Page

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 34

6.2.9 End User Signup/Register Page

The below snapshot gives the design of Registration or Signup page for the end users.

Figure 6.9:End User Signup/Register Page

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 35

6.2.10 Result/Output Page for End User

The below screenshots gives the main and important page that is result page and it

contains prediction success rate of the crop in given region. And the current weather

information of the given region. And also the values of production, import, export,

production per square area and gross production value.

Figure 6.10:Result Page for End User

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 36

CHAPTER 7

SOFTWARE TESTING
As name indicate test nothing but check something. Here software testing nothing but

checking the errors, failure and faults. Here fault is a condition which may cause a

software to fail. And the error is something which gives the difference between actual and

expected results. Failure is a nothing but a component of the system may not work

according to its functional specification. Software testing will be done by creating or

writing test cases. Here test cases consist following things expected output, actual output

and remarks.

There are some well-known testing methods which are given below

1. Validation

2. Unit

3. Integration

4. GUI

5. Browser Compatibility

6. Performance

7. Regression

8. Block Box

9. White Box

7.1 Validation Testing

Validation testing as name indicates it is used to validate the system. The users

should be register and login by filling all the given fields in the registration and login

page otherwise system will not be allow you to access the web apps. Each and every form

will be filled as per the validation rules. Validation is given to all the fields which is

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 37

present in the project. For example if you give any string values instead of numeric values

it will give an error.

7.2 Unit Testing

Unit testing is used to verify the small piece of code or small part of the program.

Here the programmer will writes a small piece of code and check for his functionality. If

it is working properly then there will be no issues, if it not working or not giving expected

output then unit test fails and then code will corrected and again it will check for the same

this process will be repeated until programmer get proper outputs. The advantage of this

testing is errors can be find and fixed very easily because it becomes easy for the

programmer to find the errors in small piece of code as compared to large programs and

hence this will increase the robustness of the system.

7.3 Integration Testing

As the name indicates that integration means combining so here integration testing is

nothing but combining all the modules or components to check whether they are working

fine when they are combined together. The unit tested modules or components will be

integrated together and then check for their functionalities. In this project we have done

the integration testing by creating three components separately and at the end of

development these three components put it together and they are working properly and

giving the expected results.

7.4 Graphical User Interface (GUI) Testing

Graphical User Interface testing is used to check the front end design of the project

by looking at all the html elements used in the page and styles used in the page. Here

tester will checks whether the all the elements aligned properly or not and checks the size,

styles, fonts and so on is designed as per the user needs or not. GUI design is very

important because user always attract towards good and stylish designs because nobody

likes when you design a large buttons unnecessary at the need of small buttons.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 38

7.5 Browser Compatibility Testing

This testing is used to check whether the project is running in all the browsers or not.

The advantage of this testing is tester will easily come to know that which browser is

good for proper working of the project and he can make it default browser to run the

project all the time. And tester also come to know that whether the styles used in the

project is supported by the browser or not. This testing is done in this project and as per

the results of testing “Mozilla Firefox” browser will give the proper output because

Bootstrap 4 styles looks very good in this browser as compared to Google Chrome,

Microsoft Edge and Internet Explorer.

7.6 Performance Testing

This testing is used to check whether the application is performing as per the

requirements or not and to check whether it taking more timing to load the pages and the

speed of the computations and results will be tested. For doing this test some automated

tools will be used.

7.7 Regression Testing

This testing will be applied on the whole application and checks is there any

functionality is missed out or not and also checks about is there any modification is

required for the application as per any new requirements or demand from the clients will

be done here.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 39

CHAPTER 8

CONCLUSION
The project “Participation of Machine Learning in Plantation in Agriculture using

Decision Making Pattern” is a very good effort to solve the problem of cost loss by

creating a machine learning prediction model. In this two modules are very important that

state authority and end user module. Here data place a vital role because the above

prediction model gives the output based on the input data. Here data consist the

information of crop production of past years. And it include following information that is

production area of the crop, weather information, So you will get more accurate results

when your data is good so that you need to filter and remove all the unwanted data and

make a dataset file in csv format from which necessary data will be consider for the

computation. Collecting the data for giving the input to project was the biggest challenge

because agricultural data is confidential so it is not easy to collect it. This is a generic

project because still it can be enhanced and those things will be seen in future

enhancement chapter. By looking at all these things I want to conclude that during the

development of this project I got an opportunity to learn some important things like how

to work under pressure and how to complete the tasks within a given time and so on

which help to increase my skills and make it more stronger.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 40

CHAPTER 9

FUTURE ENHANCEMENTS
As mentioned in previous chapter this is a generic project and considered only few

things to develop this project and this can be enhanced in the future. The enhancement

may include more validation which can be applied on the system and the area of

production or more regions will be considered for the predictions. The model now

predicting at the state and district level. But in the future it can be enhanced to the taluk

level and bit more levels if it could be possible do that. The main and important thing is

now a days users are more attracted towards mobile application compared to web

application so that an android app will be developed for this web application using the

concept called “WebView” which is present in android operating system.

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 41

APPENDIX A

BIBLIOGRAPHY

References

 https://www.analyticsvidhya.com/blog/2017/09/common-machine-learning-algorit

hms

 www.techciti.in

[1] D.S. Zingade, Omkar Buchade, Nilesh Mehta, Shubham Ghodekar, Chandan Mehta,

Crop Prediction System Using Machine Learning, 2017

[2] P.Priya, U.Muthaiah, M.Balamurugan, Sri Shanmugha, Predicting Yield Of The Crop

Using Machine Learning Algorithm, 2018

[3] Andreas C. Mueller and Sarah Guido, Introduction to Machine Learning with Python,

O’Reilly

[4] Sebastian Raschka, Python Machine Learning, First Edition 2015

JNNCE Department of MCA 2018-19


Decision Making Model Using ML for Agriculture 42

APPENDIX B

USER MANUAL
How to Run Project

Step 1:-

Open the PyCharm IDE then open the project directory then click on the terminal

button which is present at left-bottom of the screen and then run the below commands.

Python Manage.py makemigrations

Python Manage.py migrate

Python Manage.py runserver

After executing the above commands localhost server will be initiated and you will

be seen a URL link on the terminal, just click on it then a default browser will open with

your project apps or you can copy that link and open the browser of your own choice then

paste that link in browser and run it.

Step 2:-

Run the “state_auth” app and register/signup and then login. Once the login is done

then upload the filtered agricultural data or information of the crops as a state authority.

After successful upload close the “state_auth” app.

Step 3:-

Run the “User” app and register/signup and then login. Once the login is done then

you will be asked to choose district and crop. When you enter this you will be able to see

the output.

JNNCE Department of MCA 2018-19

You might also like