Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
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.
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
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,
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
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
CHAPTER 2
LITERATURE SURVEY
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
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
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
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
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
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
Economic feasibility is the most commonly used method or technique for analysing
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.
behaviour of the system. Here some points will be taken under consideration and those
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.
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
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
3. High security
4. Rapid development
5. Outstanding documentation
2.4.2 Bootstrap 4
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
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
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
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
Figure 2.2:Graph for the values of import and export of the crops
Technologies
Devlopment
Environtment)
8 Database SQLite
CHAPTER 3
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
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.
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
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.
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 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,
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
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
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
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
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
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
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.
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
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
of data from initial point to end point. In other words movement of data from one module
to other modules.
Admin
Prod_area
Net_worth
Import_export
ADD ADD
Process 2 Process 3
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.
system. Here user will be called as ‘actor’ and actions are nothing but the services
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.
The below diagram tells about the actions performed by the admin with the system.
The below diagram shows the actions performed by the end user with the system.
another object and classes. This diagram also gives about the information exchange
the vigorous features of the system. It tells about the change in the activities. Here the
The below diagram represents the flow of change in activities in admin 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.
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.
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.
The below table gives the complete database table structure of State_Auth for
Registration.
State_Auth firstdb1
The below table gives the database table design for storing the predicted values to the
database.
The below table represents the structure of table and its fields in database to store the
This table is made to store the values of gross productions in different types of
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
This below table is constructed in the database to store the values of import and
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.
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')
6.2 Screenshots
6.2.1 Admin Login Page
The below picture shows the admin login form where super users will login and
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.
The below snapshot gives the design of login in page for the state_auth module.
The below snapshot gives the design of Registration or Signup page for the
state_auth module.
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.
The below snapshot gives the design of data upload page 1 for the state_auth module.
The below snapshot gives the design of data upload page 2 for the state_auth module.
The below snapshot gives the design of data upload page 3 for the state_auth module.
The below screenshot represents the login page for end users.
The below snapshot gives the design of Registration or Signup page for the end users.
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,
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
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
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
present in the project. For example if you give any string values instead of numeric values
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
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
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.
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,
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
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.
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
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
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,
[2] P.Priya, U.Muthaiah, M.Balamurugan, Sri Shanmugha, Predicting Yield Of The Crop
[3] Andreas C. Mueller and Sarah Guido, Introduction to Machine Learning with Python,
O’Reilly
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.
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
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.
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.