0% found this document useful (0 votes)
91 views

Crop Yield Prediction Using Random Forest Algorithm

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

Vj Kumar
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
91 views

Crop Yield Prediction Using Random Forest Algorithm

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : info@datapro.in Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

Vj Kumar
Copyright
© © All Rights Reserved
You are on page 1/ 11

ABSTRACT

Most agricultural crops have been badly affected by the effect of global climate
change in India. In terms of their output over the past 20 years. It will allow policy
makers and farmers to take effective marketing and storage steps to predict crop
yields earlier in their harvest. This project will allow farmers to capture the yield of
their crops before cultivation in the field of agriculture and thus help them make
the necessary decisions. Implementation of such a method with a web-based
graphic software that is simple to use and the machine learning algorithm can then
be distributed. The results obtained are granted access to the farmer. And yet there
are various methods or protocols for such very data analytics in crop yield
prediction, and we are able to predict agricultural productivity with guidance of all
those algorithms. It utilizes a Random Forest Algorithm. By researching such
problems and issues such as weather, temperature, humidity, rainfall, humidity,
there are no adequate solutions and inventions to resolve the situation we face. In
countries like India, even in the agricultural sector, as there are many types of
increasing economic growth. In addition, the processing is useful for forecasting
the production of crop yields.

3
TABLE OF CONTENTS

CHAPTER TITLE PAGE


No

LIST OF FIGURES 6

LIST OF ABBREVATIONS 7

1 INTRODUCTION 8

1.1 About the Project 8

2 SYSTEM ANALYSIS 9

2.1 Existing system 9

2.2 Proposed system 9

3 REQUIREMENTS SPECIFICATION 10

3.1 Introduction 10

3.2 Hardware and Software specification 11

3.3 Technologies Used 11

4.1 Design and Implementation Constraints 29

4.2 Other Nonfunctional Requirements 30

5 Architecture Diagram 31

6 Modules 37

4
6.1 Modules 37

6.2 Module explanation 37

7 CODING AND TESTING 38

7.1 Coding 38

7.2 Coding standards 38

7.3 Test procedure 40

7.4 Test data and output 41

SOURCE CODE 48

8 SCREENSHOTS 60

REFERENCES 69

5
LIST OF FIGURES

5.1 Sequence Diagram

5.2 Use Case Diagram

5.3 Activity Diagram

5.4 Collaboration Diagram:

6
LIST OF SCREENSHOTS
 Filling missing values data set using Pandas & NumPy
 Graph for predicting future crop
 Open Firebase Console
 Created android app for Crop prediction
 Crop Prediction
 Enter the values of attributes
 Input given by the user goes to the trained dataset using firebase
 Predicted the crop with price
 Successfully predicted crop and price

CHAPTER 1

7
INTRODUCTION

Aim:

Predict the crop type and price of the crop using machine learning methodology
with accurate results.

Synopsis:
India is the land of agriculture and it is the major source of economy. 70% of Indian

population directly relies on agriculture. The common problem existing among the young Indian

farmers is to choose the right crop based on the location, humidity, temperature, rainfall. Due to

this, they face a serious setback in productivity. Our work proposes to help farmers determine the

predict crop type and price by doing analysis on its various parameters and to suggest crops

based on the results obtained. The system uses the Classification algorithm of Random Forest to

improve the efficiency of Crop Recommendation System. The system maps the location,

temperature, humidity, pH value and rainfall to predict the list of suitable crops for the soil and it

also provides cost of the crop. Hence it leaves upon the user to decide on the crop to be sown.

Thus, the system helps to provide knowledge to the dilettante farmers.

CHAPTER 2
8
SYSTEM ANALYSIS

2.1 EXISTING SYSTEM

Now a day‟s, dilettante farmers are hard to understand the cultivation process, crop type,
climate change, etc. Farming is that the spine for every nation's economy. Future agriculture
depends on dilettante formers. But, the new farmers have low level knowledge in this field. So,
Machine learning help to solve this type of problems. In Existing system they provide soil type
and crop using Random Forest algorithm. But everyone can able to find a soil type easily. So, we
need to predict the crop type and predict the crop price based on Machine learning technology.

2.2 PROPOSED SYSTEM


The system prepared predict major crops yield in a particular district in Tamil Nadu. The
client on their first login has to register themselves on the application on android phone .Once
the user logins into the system he gets all the access for predicting crop yield and using the input
such as location, temperature, pH value, rainfall and humidity depends on their forming land
environment. After submitting the inputs, it‟s redirect into Firebase. The firebase is an
intermediate between user input and trained data set. The input goes to the trained data, where it
processes random forest algorithm to predict crop and price. After the prediction, the predicted
value passes to the fire base. That firebase gives the predict value to the user on android
application.

9
CHAPTER 3

REQUIREMENT SPECIFICATIONS

3.1 INTRODUCTION

Agriculture is the backbone of India. As we known, food stands first in the basic need of
survival; agriculture sector needs to be given the highest preference in development. Indian
agriculture sector accounts for 18 percent of Indian agriculture gross domestic product (GDP)
and provides employment to 50% of the country‟s workforce. The main reason for considered
Agriculture sector is because it plays an important role in developing the country‟s economy.
The proposed System uses the Crop Selection as the area of research, since it the first and most
important step in the process of agricultural development and the success of this step guarantees
the result of production. Agriculture development provides assistance to the crop producers with
the help of various agricultural resources. As a result, it provides high productivity with low
consumption of resources.
Crop production may also be an advanced development that is affected by the
input parameters of soil and condition. Process parameters of agriculture vary from area to area
and producer to producer. It may also be a discouraging challenge to collect such information in
an even larger room. The Indian Meteoric Department, however, tabulates the environmental
condition information collected in the Republic of India at each 1sq.m space in various
components of the district. The huge sets of such information are often used to predict their
effect on that district or place's main crops. Within the agriculture or related sciences field, there
are entirely different foretelling methodologies developed and evaluated by researchers around
the globe. Some studies of that type are: In alternative countries, agricultural researchers have
shown that attempts to increase crop yield by pro-pesticide state maximization have been carried
out. Driven strategies for dangerously high chemical use have been introduced. The association
between chemical use and crop yield has been stated in these studies[1]. Agriculture is a partner
trade sector that has gained significantly in recent years from the growth of detector technology,
information science, and machine learning (ML) techniques.

10
3.2 HARDWARE AND SOFTWARE SPECIFICATION

3.2.1 HARDWARE REQUIREMENTS

 Hard Disk : 500GB and Above


 RAM : 4GB and Above
 Processor : I3 and Above

3.2.2 SOFTWARE REQUIREMENTS

 Operating System : Windows 7 , 8, 10 (64 bit)


 Software : Python 3.7
 Tools : Anaconda (Jupyter Note Book IDE)

3.3 TECHNOLOGIES USED


 Python

3.3.1 Introduction to Python


Python is a widely used general-purpose, high level programming language. It was

initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation.

It was mainly developed for emphasis on code readability, and its syntax allows programmers to

express concepts in fewer lines of code.

Python is a programming language that lets you work quickly and integrate systems more

efficiently.

It is used for:
11
 web development (server-side),
 software development,
 mathematics,
 System scripting.

What can Python do?

 Python can be used on a server to create web applications.


 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software development.

Why Python?

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines than some
other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as soon as it is
written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-orientated way or a functional way.

Good to know

 The most recent major version of Python is Python 3, which we shall be using in this
tutorial. However, Python 2, although not being updated with anything other than
security updates, is still quite popular.
 Python 2.0 was released in 2000, and the 2.x versions were the prevalent releases until
December 2008. At that time, the development team made the decision to release version
3.0, which contained a few relatively small but significant changes that were not
backward compatible with the 2.x versions. Python 2 and 3 are very similar, and some

12
 This makes for a quicker development cycle because you just type in your code and run
it, without the intermediate compilation step.
 One potential downside to interpreted languages is execution speed. Programs that are
compiled into the native language of the computer processor tend to run more quickly
than interpreted programs. For some applications that are particularly computationally
intensive, like graphics processing or intense number crunching, this can be limiting.
 In practice, however, for most programs, the difference in execution speed is measured in
milliseconds, or seconds at most, and not appreciably noticeable to a human user. The
expediency of coding in an interpreted language is typically worth it for most
applications.
 For all its syntactical simplicity, Python supports most constructs that would be expected
in a very high-level language, including complex dynamic data types, structured and
functional programming, and object-oriented programming.
 Additionally, a very extensive library of classes and functions is available that provides
capability well beyond what is built into the language, such as database manipulation or
GUI programming.
 Python accomplishes what many programming languages don‟t: the language itself is
simply designed, but it is very versatile in terms of what you can accomplish with it.

Support Vector Machine (SVM)


Introduction:
Mastering machine learning algorithms isn‟t a myth at all. Most of the beginners start by
learning regression. It is simple to learn and use, but does that solve our purpose? Of course not!
Because, you can do so much more than just Regression!
14

You might also like