Final Document
Final Document
TECHNIQUES TO
PREDICT CROP YEILD
A Mini Project Report Submitted to
JNTU Hyderabad in partial fulfillment
of the requirements for the award of the degree
BACHELOR OF
TECHNOLOGY
IN
ENGINEERING
Submitted by
KOLA SAIPREETHI 19RG1A0588
Accredited by NBA
MAY 2023
DEPARTMENT OF COMPUTE R SCIENCE &
ENGINEERING
MAY 2023
CERTIFICATE
External Examiner
ACKNOWLEDGEMENT
KOLA. SAIPREETHI
19RG1A0588___________________
VEMULA. RANI
20RG5A0508___________________
NEMUARI. SHIVANI
20RG5A0510____________________
MEMUGANTI. LAXMI
20RG5A0511____________________
INDEX
Chapter Page
No.
ABSTRACT vii
LIST OF FIGURES
viii
1. INTRODUCTION 2
1.1 Motivation 2
1.2 Problem definition
1.3 objective of Project 2
2.LITERATURE SURVEY
2.1 Predicting yield of the crop using machine 2
Learning algorithms
2.2 Applications of machine learning 4
techniques
In agricultural crop prediction: a review
2.3 A model for prediction of crop yeild 4
6.SYSTEM TESTING 7
7.SCREENSHOTS
9
8.CONCLUSION
9.REFERENCES
9
11
11
11
16
17
46
49
54
55
LIST OF FIGURES
51
52
ABSTRACT
1.1 MOTIVATION
AUTHORS: Manjula.E
3.SYSTEM
ANALYSIS
3.1 EXISTING SYSTEM:
Due to the revolution in industrialization, the economic
contribution of agriculture to India’s GDP is steadily declining with the
country’s broad-based economic growth. The problem that the Indian
Agriculture sector is facing is the integration of technology to bring the
desired outputs. With the advent of new technologies and overuse of non-
renewable energy resources patterns of rainfall and temperature are
disturbed. The inconsistent trends developed from the side effects of
global warming make it cumbersome for the farmers to clearly predict the
temperature and rainfall patterns thus affecting their crop yield
productivity. In order to perform accurate prediction and handle
inconsistent trends in temperature and rainfall various machine learning
algorithms like RNN, LSTM, etc can be applied to get a pattern. It will
complement the agricultural growth in India and all together augment the
ease of living for farmers. In past, many researchers have applied
machine learning techniques to enhance agricultural growth of the
country.
HARDWARE REQUIREMENTS:
SOFTWARE REQUIREMENTS:
ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the
system will have on the organization. The amount of fund that the
company can pour into the research and development of the system is
limited. The expenditures must be justified. Thus the developed system as
well within the budget and this was achieved because most of the
technologies used are freely available. Only the customized products had
to be purchased.
TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that is, the
technical requirements of the system. Any system developed must not
have a high demand on the available technical resources. This will lead to
high demands on the available technical resources. This will lead to high
demands being placed on the client. The developed system must have a
modest requirement, as only minimal or null changes are required for
implementing this system.
SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the
system by the user. This includes the process of training the user to use
the system efficiently. The user must not feel threatened by the system,
instead must accept it as a necessity. The level of acceptance by the
users solely depends on the methods that are employed to educate the
user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the
system.
4.SYSTEM
DESIGN
4.1 SYSTEM ARCHITECTURE:
ACTIVITY DIAGRAM:
Activity diagrams are graphical representations of workflows of
stepwise activities and actions with support for choice, iteration and
concurrency. In the Unified Modeling Language, activity diagrams can be
used to describe the business and operational step-by-step workflows of
components in a system. the overall flow of control. Control workflows of
5.SOFTWARE
ENVIRONMENT
What is Python :-
Advantages of Python :-
1. Extensive Libraries
2. Extensible
3. Embeddable
4. Improved Productivity
5. IOT Opportunities
8. Object-Oriented
10. Portable
11. Interpreted
1. Less Coding
Almost all of the tasks done in Python requires less coding when
the same task is done in other languages. Python also has an awesome
standard library support, so you don’t have to search for any third-party
libraries to get your job done. This is the reason that many people
suggest learning Python to beginners.
2. Affordable
So far, we’ve seen why Python is a great choice for your project.
But if you choose it, you should be aware of its consequences as well.
Let’s now see the downsides of choosing Python over another
language.
1. Speed Limitations
3. Design Restrictions
5. Simple
History of Python : -
What do the alphabet and the programming language
Python have in common? Right, both start with ABC. If we are talking
about ABC in the Python context, it's clear that the programming
language ABC is meant. ABC is a general-purpose programming
language and programming environment, which had been developed
in the Netherlands, Amsterdam, at the CWI (Centrum Wiskunde
&Informatica). The greatest achievement of ABC was to influence the
design of Python.Python was conceptualized in the late 1980s. Guido
van Rossum worked that time in a project at the CWI, called Amoeba, a
distributed operating system. In an interview with Bill Venners 1, Guido
van Rossum said: "In the early 1980s, I worked as an implementer on a
team building a language called ABC at Centrum voor Wiskunde en
Informatica (CWI). I don't know how well people know ABC's influence
on Python. I try to mention ABC's influence because I'm indebted to
everything I learned during that project and to the people who worked
on it."Later on in the same Interview, Guido van Rossum continued: "I
remembered all my experience and some of my frustration with ABC. I
decided to try to design a simple scripting language that possessed
some of ABC's better properties, but without its problems. So I started
typing. I created a simple virtual machine, a simple parser, and a
simple runtime. I made my own version of the various ABC parts that I
liked. I created a basic syntax, used indentation for statement
grouping instead of curly braces or begin-end blocks, and developed a
small number of powerful data types: a hash table (or dictionary, as we
call it), a list, strings, and numbers."
Emotion analysis
Sentiment analysis
Speech synthesis
Speech recognition
Customer segmentation
Object recognition
Fraud detection
Fraud prevention
Now that you are done with the prerequisites, you can move
on to actually learning ML (Which is the fun part!!!) It’s best to start
with the basics and then move on to the more complicated stuff. Some
of the basic concepts in ML are:
With ML, you don’t need to babysit your project every step of
the way. Since it means giving machines the ability to learn, it lets them
make predictions and also improve the algorithms on their own. A
common example of this is anti-virus softwares they learn to filter new
threats as they are recognized. ML is also good at recognizing spam.
3. Continuous Improvement
1. Data Acquisition
3. Interpretation of Results
Purpose :-
We demonstrated that our approach enables successful
segmentation of intra-retinal layers—even with low-quality images
containing speckle noise, low contrast, and different intensity ranges
throughout—with the assistance of the ANIS feature.
Python
Tensorflow
Numpy
Pandas
Matplotlib
Now, check for the latest and the correct version for your operating
system.
Step 4: Scroll down the page until you find the Files option
Step 5: Here you see a different version of python along with the
operating system.
• To download Windows 32-bit python, you can select any one from the
three options: Windows x86 embeddable zip file, Windows x86 executable
installer or Windows x86 web-based installer.
•To download Windows 64-bit python, you can select any one from the
three options: Windows x86-64 embeddable zip file, Windows x86-64
executable installer or Windows x86-64 web-based installer.
Here we will install Windows x86-64 web-based installer. Here your first
part regarding which version of python is to be downloaded is completed.
Now we move ahead with the second part in installing python i.e.
Installation
Note: To know the changes or updates that are made in the version
you can click on the Release Note Option.
Installation of Python
Step 1: Go to Download and Open the downloaded python version to
carry out the installation process.
Step 2: Before you click on Install Now, Make sure to put a tick on Add
Python 3.7 to PATH.
Step 3: Click on Install NOW After the installation is successful. Click
on Close.
Step 3: Click on IDLE (Python 3.7 64-bit) and launch the program
Step 4: To go ahead with working in IDLE you must first save the
file. Click on File > Click on Save
Step 5: Name the file and save as type should be Python files. Click on
SAVE. Here I have named the files as Hey World.
Step 6: Now for e.g. enter print
6.SYSTEM TEST
The purpose of testing is to discover errors. Testing is the process
of trying to discover every conceivable fault or weakness in a work
product. It provides a way to check the functionality of components, sub
assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system
meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type
addresses a specific testing requirement.
TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate
that the internal program logic is functioning properly, and that program
inputs produce valid outputs. All decision branches and internal code flow
should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before
integration. This is a structural testing, that relies on knowledge of its
construction and is invasive. Unit tests perform basic tests at component
level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business
process performs accurately to the documented specifications and
contains clearly defined inputs and expected results.
Integration testing
Integration tests are designed to test integrated software
components to determine if they actually run as one program. Testing is
event driven and is more concerned with the basic outcome of screens or
fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing
is specifically aimed at exposing the problems that arise from the
combination of components.
Functional test
Functional tests provide systematic demonstrations that
functions tested are available as specified by the business and technical
requirements, system documentation, and user manuals.
Test objectives
All field entries must work properly.
Pages must be activated from the identified link.
The entry screen, messages and responses must not be delayed.
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
Integration Testing
Result screenshot-7.2
In above screen selecting and uploading ‘Dataset.csv’ file and then click
on ‘Open’ button to load dataset and to get below screen
Result scrrenshot-7.3
In above screen dataset loaded and we can see dataset contains some
non-numeric values and ML will not take non-numeric values so we need
to preprocess dataset to convert non-numeric values to numeric values by
assigning ID to each non-numeric value. So click on ‘Preprocess Dataset’
button to process dataset
In above screen all non-numeric values converted to numeric format and
in below lines we can see dataset contains total 246091 records and
application using (80%) 196872 records to train ML and using (20%)
49219 records to test ML prediction error rate (RMSE (root mean square
error)). Now click on ‘Train Machine Learning Algorithm’ button to train
Decision Tree Machine learning algorithm on above dataset and then
calculate prediction error rate
Result screenshot-7.4
In above screen ML is trained and we got prediction error rate as 0.067%
and now Decision Tree model is ready and now click on ‘Upload Test Data
& Predict Yield’ button to upload test data and then application will predict
production
Result screenshot-7.5
In above screen selecting and uploading ‘test.csv’ file and then click on
‘Open’ button to load test data and then application will give below
prediction result
Result screenshot-7.6
In above screen each test record is separated with newline and in above
screen in square bracket we can see test data values and after square
bracket we can see predicted production and after that we can see
predicted YIELD per acre. So each test record and its prediction is
separated with newline. You
8 .CONCLUSION
The paper presented the various machine learning algorithms for
predicting the yield of the crop on the basis of temperature, rainfall,
season and area. Experiments were conducted on Indian government
dataset and it has been established that Random Forest Regressor gives
the highest yield prediction accuracy. Sequential model that is Simple
Recurrent Neural Network performs better on rainfall prediction while
LSTM is good for temperature prediction. By combining rainfall,
temperature along with other parameters like season and area, yield
prediction for a certain district can be made. Results reveals that Random
Forest is the best classifier when all parameters are combined. This will
not only help farmers in choosing the right crop to grow in the next
season but also bridge the gap between technology and the agriculture
sector.
9.REFERENCES