CORRECTION DOCUMENT
CORRECTION DOCUMENT
LEARNING INSIGHTS
A PROJECT REPORT
Submitted by
JANANI T S (8115U20IT015)
SANTHIYA L (8115U20IT040)
SWATHI S (8115U20IT053)
BACHELOR OF TECHNOLOGY
IN
INFORMATION TECHNOLOGY
APRIL 2024
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
We thank the almighty GOD, without whom it would not have been
possible for us to complete our project.
We express our hearty gratitude and thanks to our honourable and grateful
Executive Director Dr.S.KUPPUSAMY, B.Sc., MBA., Ph.D.,
K.Ramakrishnan College of Engineering (Autonomous).
JANANI T S (8115U20IT015)
SANTHIYA L (8115U20IT040)
SWATHI S (8115U20IT053)
Ms.J.PRIYADHARSHINI M.E.,
Assistant Professor/IT
ABSTRACT
I
TABLE OF CONTENTS
5 MODULES DESCRIPTION 22
5.1 PROGRAM DESIGN 23
5.1.1 USER REGISTRATION 23
5.1.2 USER LOGIN 23
II
5.1.3 ADMIN LOGIN 24
5.1.4 CROP PREDICTION 24
5.1.5 YIELD OPTIMIZATION 24
5.1.6 FERTILIZER 24
PREDICTION
6 SYSTEM DESIGN 25
6.1 ARCHITECTURE DIAGRAM 25
6.2 DATA FLOW DIAGRAM 27
6.3 USE CASE DAIGRAM 29
6.4 ER DIAGRAM 31
6.5 ACTIVITY DIAGRAM 33
7 TESTING 35
7.1 SYSTEM TESTING 35
7.2 UNIT TESTING 36
7.2.1 INTEGRATION TESTING 36
7.2.2 VALIDATION TESTING 36
7.2.3 VERIFICATION TESTING 37
7.3 TEST CASE 38
8 FEASIBILITY STUDY AND 37
CONCLUSION
8.1 FEASIBILITY STUDY 39
8.1.1 TECHNICAL FEASIBILITY 39
8.1.2 ECONOMICAL 39
FEASIBILITY
8.1.3 OPERATIONAL 40
FEASIBILITY
8.1.4 LEGAL FEASIBILITY 40
8.1.5 TIME FEASIBILITY 40
III
8.2 CONCLUSION 41
APPENDIX A(SAMPLE CODING) 42
APPENDIX B(SCREENSHOTS) 57
REFERENCES 63
IV
LIST OF FIGURES
LIST OF TABLES
TABLE NO TABLE NAME PAGE NO
VI
LIST OF ABBREVIATIONS
ABBREVATION EXPANSION
DSS Decision Support System
CSS Cascading style sheet
KNN K-Nearest Neighbor
DFD Data Flow Diagram
DOA Deviation of arch
ER Entity-Relationship
PLSR Partial least squares regression
CNN Convolution Neural Network
RNN Recurrent Neural Network
LSTM Long Short-Term Memory
NB Naïve Baye’s
SVM Support vector machine
IPM Integrated pest management
SOM Soil organic matter
VNIR Visible near-infrared
RMSE Root mean squared error
WOFOST World Food Studies
LAI Leaf area index
CGI Common Gateway Interface
ICFU International Components for
Unicode
VII
CHAPTER 1
INTRODUCTION
In recent years, the agricultural sector has witnessed a remarkable
transformation driven by technological advancements and data-driven
innovations. With the global population expected to surpass 9 billion by 2050, the
demand for food is increasing exponentially, placing unprecedented pressure on
farmers to enhance crop productivity while ensuring sustainability and resource
efficiency.
This project embarks on a journey to explore the intersection of agriculture
and technology, aiming to develop a comprehensive Decision Support System
(DSS) tailored to the needs of modern farmers. Spanning across five pages, this
introduction sets the stage for understanding the significance of leveraging
technology in agriculture and outlines the objectives and key features of the
proposed DSS.
In the world of developing technologies, the success of sharing information
will help the agriculturists in realizing and developing their potential. The
information sharing is that the valuable and timely information is being shared
between agriculturists, either formally or informally. The willingness of
information sharing refers to the open attitude among agriculturists. This open
attitude determines the degree and scope of information sharing. Using web-
technologies like html and css web application is built, dataset is created by
gathering data from multiple resources and place them in place which is used to
predict the price of the crop and results are subjected to non-linear test later
priorities are set and rankings are given to the list of crops. Place information in
our application and share that information to agriculturists whose data is collected
and stored in the mysql server. Software to automatically send the updated
information to the agriculturists in the form of text message.so that agriculturists
no need to go to nearby towns and cities to know the updated information.
Machine learning algorithms to predict the price of the crop for the next two
months. For prediction purpose Support vector machine(SVM), Naïve Baye’s
(NB) and K-Nearest Neighour(KNN) algorithms are used to predict the cost of
1
the crop production.
2
1.1 CROP YIELD PREDICTION
3
Traditional approaches to fertilizer management often rely on blanket
recommendations or generic guidelines, which may not account for the specific
needs of individual crops or soil types. As a result, farmers may overapply or
underapply fertilizers, leading to nutrient imbalances, environmental pollution,
and reduced crop yields.
To address these challenges, decision support systems (DSSs) offer personalized
fertilizer recommendations based on a comprehensive analysis of soil data, crop
characteristics, and nutrient requirements. By integrating soil testing, remote
sensing, and predictive modeling techniques, DSSs can optimize fertilizer
application rates, timing, and placement to maximize nutrient uptake and
minimize environmental impact.
By providing tailored recommendations for each crop and field, DSSs enable
farmers to optimize fertilizer use, improve crop yields, and reduce costs.
Furthermore, by promoting precision agriculture practices, DSSs contribute to
sustainable agriculture by minimizing nutrient runoff, soil erosion, and
greenhouse gas emissions associated with fertilizer application.
Pesticides are essential tools for pest and disease management in agriculture,
protecting crops from harmful insects, pathogens, and weeds. However,
indiscriminate use of pesticides can lead to environmental pollution, ecosystem
disruption, and health hazards for humans and wildlife.
To optimize pesticide use and minimize negative impacts, decision support
systems (DSSs) offer personalized recommendations based on integrated pest
management (IPM) principles. By analyzing data on pest populations, crop
health, weather conditions, and pesticide efficacy, DSSs can identify the most
effective and environmentally sustainable pest control strategies for each
situation.
Through the integration of biological control methods, cultural practices, and
chemical interventions, DSSs help farmers implement targeted pest management
strategies that minimize reliance on synthetic pesticides. By reducing pesticide
4
use and promoting biodiversity, DSSs contribute to the conservation of natural
resources, preservation of ecosystem services, and long-term sustainability of
agricultural syste
CHAPTER 2
LITERATURE SURVEY
2.1 GENERAL
A literature review is a body of text that aims to review the critical points of
current knowledge on methodological approaches to a particular topic. It is
secondary sources and discuss published information in a particular subject area
and sometimes information in a particular subject area within a certain time
period. Its ultimate goal is to bring the reader up to date with current literature on
a topic and forms the basis for another goal, such as future research that may be
needed in the area and precedes a research proposal and may be just a simple
summary of sources. Usually, it has an organizational pattern and combines both
summary and synthesis.
5
2.2 REVIEW OF LITERATURE SURVEY
Year: 2015
Description:
6
CinaORCID,Ahmed ShdefatORCID andLouai Saker
Year: 2023
Description:
Machine learning applications are having a great impact on the global
economy by transforming the data processing method and decision making.
Agriculture is one of the fields where the impact is significant, considering the
global crisis for food supply. This research investigates the potential benefits of
integrating machine learning algorithms in modern agriculture. The main focus of
these algorithms is to help optimize crop production and reduce waste through
informed decisions regarding planting, watering, and harvesting crops. This paper
includes a discussion on the current state of machine learning in agriculture,
highlighting key challenges and opportunities, and presents experimental results
that demonstrate the impact of changing labels on the accuracy of data analysis
algorithms. The findings recommend that by analyzing wide-ranging data
collected from farms, incorporating online IoT sensor data that were obtained in a
real-time manner, farmers can make more informed verdicts about factors that
affect crop growth. Eventually, integrating these technologies can transform
modern agriculture by increasing crop yields while minimizing waste. Fifteen
different algorithms have been considered to evaluate the most appropriate
algorithms to use in agriculture, and a new feature combination scheme-enhanced
algorithm is presented. The results show that a classification accuracy of 99.59%
can be achieved using the Bayes Net algorithm and 99.46% using Naïve Bayes
Classifier and Hoeffding Tree algorithms. These results will indicate an increase
in production rates and reduce the effective cost for the farms, leading to more
resilient infrastructure and sustainable environments. Moreover, the findings
obtained in this study can also help future farmers detect diseases early, increase
crop production efficiency, and reduce prices when the world is experiencing
food shortages.
7
Title: Fruit recognition from images using deep learning applications
Description:
Smart imaging devices have been used at a rapid rate in the agriculture sector
for the last few years. Fruit recognition and classification is noticed as one of the
looming sectors in computer vision and image classification. A fruit classification
may be adopted in the fruit market for consumers to determine the variety and
grading of fruits. Fruit quality is a prerequisite property from a health viewpoint.
Classification systems described so far are not adequate for fruit recognition and
classification during accuracy and quantitative analysis. Deep learning models
have the ability to extract the potential image features without using handcrafted
features. In this paper, Type-II Fuzzy, TLBO (Teacher-learner based
optimization), and deep learning Convolution Neural Network (CNN), Recurrent
Neural Network (RNN), and Long Short-Term Memory (LSTM) applications
proposed to enhance, segment, recognize and classify the fruit images. Thus, the
examination of new proposals for fruit recognition and classification is
worthwhile. In the present time, automatic fruit recognition and classification is
though a demanding task. Deep learning is a powerful state-of-the-art approach
for image classification. This task incorporates deep learning models: CNN,
RNN, LSTM for classification of fruits based on chosen optimal and derived
features. As preliminary arises, it has been recognized that the recommended
procedure has effective accuracy and quantitative analysis results. Moreover, the
comparatively high computational momentum of the proposed scheme will
promote in the future.
8
Title: Coupling machine learning and crop modeling improves crop yield
prediction in the US Corn
Author: Belt ,Mohsen Shahhosseini, Guiping Hu, Isaiah Huber & Sotirios V.
Archontoulis
Year: 2021
Description:
This study investigates whether coupling crop modeling and machine learning
(ML) improves corn yield predictions in the US Corn Belt. The main objectives
are to explore whether a hybrid approach (crop modeling + ML) would result in
better predictions, investigate which combinations of hybrid models provide the
most accurate predictions, and determine the features from the crop modeling that
are most effective to be integrated with ML for corn yield prediction. Five ML
models (linear regression, LASSO, LightGBM, random forest, and XGBoost) and
six ensemble models have been designed to address the research question. The
results suggest that adding simulation crop model variables (APSIM) as input
features to ML models can decrease yield prediction root mean squared error
(RMSE) from 7 to 20%. Furthermore, investigated partial inclusion of APSIM
features in the ML prediction models and found soil moisture related APSIM
variables are most influential on the ML predictions followed by crop-related and
phenology-related variables. Finally, based on feature importance measure, it has
been observed that simulated APSIM average drought stress and average water
table depth during the growing season are the most important APSIM inputs to
ML. This result indicates that weather information alone is not sufficient and ML
models need more hydrological inputs to make improved yield predictions.
9
Title: Improving Spring Maize Yield Estimation at Field Scale by
Assimilating
Time-Series HJ-1 CCD Data into the WOFOST Model Using a New Method
with Fast Algorithms
Year: 2016
Description:
10
CHAPTER 3
SYSTEM ANALYSIS
The process of analyzing the system that existed and alterations that are
made in the proposed system is stated in system analysis.
11
Inefficient Resource Allocation: Without data-driven insights, farmers may
inefficiently allocate resources such as water, fertilizers, and pesticides. This
inefficiency can lead to wastage of resources and increased production costs.
Limited Monitoring and Feedback: The existing system may lack mechanisms
for monitoring crop performance in real-time and providing feedback on
management practices. Without this feedback loop, farmers may miss
opportunities for optimization and improvement.
Dependency on Expertise: Successful crop management in the existing system
often depends on the expertise and experience of individual farmers. This
dependency can be a barrier for new or inexperienced farmers who may lack the
necessary knowledge and skills.
Environmental Impact: Inefficient use of resources and suboptimal
management practices in the existing system can have negative environmental
consequences, such as soil degradation, water pollution, and biodiversity loss.
The proposed Crop Yield Management System aims to address the limitations
of the existing system by leveraging technology, data analytics, and predictive
modeling to optimize agricultural practices and enhance crop yields. The
Technique use in proposed system is DSS.
Key features and improvements of the proposed system include:
Data-Driven Decision Making: The proposed system leverages data analytics
and machine learning algorithms to provide farmers with actionable insights for
crop selection, fertilizer application, and pest management. By analyzing
historical data, soil composition, weather patterns, and crop performance metrics,
the system enables farmers to make informed decisions that maximize yields and
optimize resource utilization.
Predictive Capabilities: Unlike the existing system, which relies on reactive
measures, the proposed system employs predictive modeling to anticipate crop
outcomes and identify potential risks in advance. By forecasting crop yields,
nutrient requirements, and pest threats, farmers can proactively implement
12
strategies to mitigate risks and optimize productivity.
Automation and Efficiency: Through automation and digitization of processes,
the proposed system streamlines routine tasks such as data collection, analysis,
and reporting. By reducing manual effort and minimizing paperwork, farmers can
allocate more time and resources to strategic decision-making and crop
management activities.
Customization and Personalization: The proposed system offers customizable
features that cater to the specific needs and preferences of individual farmers.
From crop recommendations tailored to soil conditions and climate variability to
personalized fertilizer and pesticide prescriptions, the system empowers farmers
to implement tailored strategies that optimize crop performance and profitability.
Real-Time Monitoring and Feedback: With real-time monitoring capabilities,
the proposed system enables farmers to track crop health, soil moisture levels,
and pest activity throughout the growing season. By receiving timely feedback on
crop conditions and management practices, farmers can make adjustments as
needed to maximize yields and minimize losses.
Resource Optimization: By optimizing the use of resources such as water,
fertilizers, and pesticides, the proposed system promotes sustainable agricultural
practices and reduces environmental impact. Through precision agriculture
techniques such as variable rate application and targeted interventions, farmers
can minimize waste and enhance resource efficiency.
Accessibility and Scalability: The proposed system is designed to be accessible
and scalable, catering to farmers of all sizes and levels of technological
proficiency. Whether operating small family farms or large commercial
enterprises, farmers can benefit from the features and functionalities offered by
the system, thereby leveling the playing field and promoting inclusive
agricultural development.
Continuous Improvement: Through data collection, analysis, and feedback
loops, the proposed system facilitates continuous improvement in crop
management practices. By learning from past experiences and adapting to
changing conditions, farmers can refine their strategies over time, leading to
13
increased productivity, resilience, and profitability.
CHAPTER 4
SYSTEM REQUIREMENTS
RAM 4.00 GB
Processor Intel(R) Pentium(R)
2.11GHz
Hard Disk 466 GB
Memory 3.80 GB
Display 1366 x 768 x 60Hz
14
4.3 SOFTWARE DESCRIPTION
15
Interpreter" or PHP/FI. PHP/FI could be used to build simple, dynamic web
applications. To accelerate bug reporting and improve the code, Lerdorf initially
announced the release of PHP/FI as "Personal Home Page Tools (PHP Tools)
version 1.0" on the Usenet discussion group
comp.infosystems.www.authoring.cgi on June 8, 1995. This release already had
the basic functionality that PHP has as of 2013. This included Perl-like variables,
form handling, and the ability to embed HTML. The syntax resembled that of
Perl but was simpler, more limited and less consistent.
Early PHP was not intended to be a new programming language, and grew
organically, with Lerdorf noting in retrospect: "I don’t know how to stop it, there
was never any intent to write a programming language […] I have absolutely no
idea how to write a programming language, I just kept adding the next logical
step on the way." A development team began to form and, after months of work
and beta testing, officially released PHP/FI 2 in November 1997.
The fact that PHP was not originally designed but instead was developed
organically has led to inconsistent naming of functions and inconsistent ordering
of their parameters. In some cases, the function names were chosen to match the
lower-level libraries which PHP was "wrapping", while in some very early
versions of PHP the length of the function names was used internally as a hash
function, so names were chosen to improve the distribution of hash values.
PHP 3 and 4
Zeev Suraski and Andi Gutmans rewrote the parser in 1997 and formed the
base of PHP 3, changing the language's name to the recursive acronymPHP:
Hypertext Preprocessor.
Afterwards, public testing of PHP 3 began, and the official launch came in
June 1998. Suraski and Gutmans then started a new rewrite of PHP's core,
producing the Zend Engine in 1999. They also founded Zend Technologies in
Ramat Gan, Israel. On May 22, 2000, PHP 4, powered by the Zend Engine 1.0,
was released. As of August 2008 this branch reached version 4.4.9. PHP 4 is no
16
longer under development nor will any security updates be released.
PHP 5
On July 13, 2004, PHP 5 was released, powered by the new Zend Engine II.
PHP 5 included new features such as improved support for object-oriented
programming, the PHP Data Objects (PDO) extension (which defines a
lightweight and consistent interface for accessing databases), and numerous
performance enhancements.
In 2008 PHP 5 became the only stable version under development. Late static
binding had been missing from PHP and was added in version 5.3. Many high-
profile open-source projects ceased to support PHP 4 in new code as of February
5, 2008, because of the GoPHP5 initiative, provided by a consortium of PHP
developers promoting the transition from PHP 4 to PHP 5.
PHP 6 and Unicode
PHP received mixed reviews due to lacking native Unicode support at the core
language level. In 2005, a project headed by Andrei Zmievski was initiated to
bring native Unicode support throughout PHP, by embedding the International
Components for Unicode (ICU) library, and representing text strings as UTF-16
internally. Since this would cause major changes both to the internals of the
language and to user code, it was planned to release this as version 6.0 of the
language, along with other major features then in development.
However, a shortage of developers who understood the necessary changes,
and performance problems arising from conversion to and from UTF-16, which is
rarely used in a web context, led to delays in the project. As a result, a PHP 5.3
release was created in 2009, with many non-Unicode features back-ported from
PHP 6, notably namespaces. In March 2010, the project in its current form was
officially abandoned, and a PHP 5.4 release was prepared containing most
remaining non-Unicode features from PHP 6, such as traits and closure re-
binding. Initial hopes were that a new plan would be formed for Unicode
integration, but as of 2014 none has been adopted.
17
PHP 7
During 2014 and 2015, a new major PHP version was developed, which was
numbered PHP 7. The numbering of this version involved some debate. While
the PHP 6 Unicode experiment had never been released, several articles and book
titles referenced the PHP 6 name, which might have caused confusion if a new
release were to reuse the name. After a vote, the name PHP 7 was chosen. The
foundation of PHP 7 is a PHP branch that was originally dubbed PHP next
generation (phpng). It was authored by Dmitry Stogov, Xinchen Hui and Nikita
Popov, and aimed to optimize PHP performance by refactoring the Zend Engine
while retaining near-complete language compatibility.
As of 14 July 2014, WordPress-based benchmarks, which served as the main
benchmark suite for the phpng project, showed an almost 100% increase in
performance. Changes from phpng are also expected to make it easier to improve
performance in the future, as more compact data structures and other changes are
seen as better suited for a successful migration to a just-in-time (JIT) compiler.
Because of the significant changes, the reworked Zend Engine is called Zend
Engine 3, succeeding Zend Engine 2 used in PHP 5.
Because of major internal changes in phpng, it must receive a new major
version number of PHP, rather than a minor PHP 5 release, according to PHP's
release process. Major versions of PHP are allowed to break backward-
compatibility of code and therefore PHP 7 presented an opportunity for other
improvements beyond phpng that require backward-compatibility breaks.
MYSQL
MySQL is an open-source relational database management system
(RDBMS); in July 2013, it was the world's second most [a] widely used RDBMS,
and the most widely used open-source client–server model RDBMS.[9] It is
named after co-founder Michael Widenius's daughter, My.[10] The SQL acronym
stands for Structured Query Language. The MySQL development project has
made its source code available under the terms of the GNU General Public
License, as well as under a variety of proprietary agreements.
18
MySQL was owned and sponsored by a single for-profit firm, the Swedish
company MySQL AB, now owned by Oracle Corporation. For proprietary use,
several paid editions are available, and offer additional functionality. MySQL is
a popular choice of database for use in web applications, and is a central
component of the widely used LAMP open-source web application software
stack (and other "AMP" stacks). LAMP is an acronym for "Linux, Apache,
MySQL, Perl/PHP/Python". Free-software open-source projects that require a
full-featured database management system often use MySQL.
Applications that use the MySQL database include: TYPO3, MODx, Joomla,
WordPress, phpBB, MyBB, Drupal and other software. MySQL is also used in
many high-profile, large-scale websites, including Google (though not for
searches), Facebook, Twitter, Flickr,[ and YouTube. On all platforms except
Windows, MySQL ships with no GUI tools to administer MySQL databases or
manage data contained within the databases. Users may use the included
command line tools, or install MySQL Workbench via a separate download.
Many third party GUI tools are also available.
PHP 8.3
PHP 8.3 is anticipated to be the next major release in the PHP programming
language series, following PHP 8.0 and PHP 8.1. It is expected to introduce
several enhancements, new features, and improvements aimed at further
enhancing the performance, security, and developer experience of PHP
applications. Here's a speculative description of PHP 8.3:
Performance Improvements:
PHP 8.3 is likely to continue the trend of performance improvements seen in
previous versions, with optimizations to the PHP engine and runtime.
Efforts to optimize memory usage and increase execution speed may be a focus
in PHP 8.3, resulting in more efficient PHP applications.
Language Features:
New Syntax Features: PHP 8.3 may introduce new syntax features to enhance
the expressiveness and readability of PHP code.
Typed Properties Enhancements: Building upon the typed properties feature
19
introduced in PHP 7.4, PHP 8.3 could include enhancements or refinements to
typed properties syntax and functionality.
Improved Union Types: Union types, introduced in PHP 8.0, may see
improvements or additional capabilities in PHP 8.3, further enhancing type safety
in PHP applications.
Security Enhancements:
PHP 8.3 is expected to include security enhancements to mitigate potential
vulnerabilities and strengthen the overall security posture of PHP applications.
Improved support for secure coding practices and stronger encryption algorithms
may be incorporated into PHP 8.3 to enhance application security.
Developer Experience:
Error Handling Improvements: PHP 8.3 may introduce enhancements to error
handling mechanisms, providing developers with better tools for debugging and
diagnosing issues in PHP applications.
Tooling Enhancements: PHP 8.3 could include improvements to development
tools, such as IDE support, debugging tools, and profiling utilities, to enhance the
overall developer experience.
Compatibility and Deprecations:
PHP 8.3 is expected to maintain a balance between introducing new features
and maintaining backward compatibility with existing PHP codebases.
Deprecated features and functions may be officially removed or marked for
removal in PHP 8.3, encouraging developers to migrate to newer alternatives and
best practices.
Community Engagement:
PHP 8.3 development is likely to involve active participation from the PHP
community, with contributions from developers, contributors, and stakeholders
shaping the direction and features of the release.
Community feedback and input are essential in identifying priorities,
addressing issues, and refining features during the development cycle of PHP 8.3.
Overall, PHP 8.3 is anticipated to be a significant milestone in the evolution of
the PHP language, bringing new features, performance enhancements, and
20
security improvements to PHP developers and applications. While specific details
of PHP 8.3 features and enhancements are speculative until an official release,
the PHP community eagerly anticipates the continued evolution and innovation of
the PHP language.
Jupyter Notebook
PYTHON
Machine Learning
Test frameworks.
Multimedia
Scientific computing
22
CHAPTER 5
IMPLEMENTATION
Implementation describes about the various modules that are used in the
database to perform the task.
SYSTEM IMPLEMENTATION
Implementation is that stage of the project when the theoretical design is
turned into a working system. After testing the modules successfully, the
necessary privileges are given to the users. All the users are requested to handle
the system carefully. The real time problems that occur are successfully solved.
The objective is to put the tested system into operation. It consists of
24
system. Users fill out a registration form with required details. Users create a
secure password following specified criteria.
5.1.2 User Login:
The User Login module allows registered users to access their accounts
securely. Users provide their credentials, typically a username or email address
along with a password, to authenticate and gain access to account-specific
information and features. Users enter their credentials into a login form for
authentication.
25
The Fertilizer Prediction module predicts appropriate fertilizer
recommendations for specific crops and soil conditions. Users provide soil data,
crop type, and other relevant information, and the system generates fertilizer
recommendations based on nutrient requirements and soil analysis. Users input
soil data such as pH level, nutrient composition, and crop type.
Recommendation Algorithms: Utilization of algorithms to analyze input data and
recommend suitable fertilizers based on nutrient requirements.
CHAPTER 6
SYSTEM DESIGN
26
27
Fig 6.1.1 ARCHITECTURE DIAGRAM
29
Fig 6.2.1 DATAFLOW DIAGRAM
30
6.3 USE CASE DIAGRAM
31
Fig 6.3.1 USECASE DIAGRAM
32
6.4 ER DIAGRAM
An Entity-Relationship diagram is crucial for a plant disease classification
system as it provides a visual representation of the relationships and entities
within the system, helping to organize and structure complex data. In the context
of plant disease classification, various entities such as plants, diseases, symptoms,
and classifications exist, each having distinct relationships with one another. The
ER diagram helps to define these relationships clearly, enabling efficient data
management and retrieval. This graphical representation aids in designing a well-
organized database schema, ensuring that the information related to plant diseases
is accurately captured and easily accessible. Additionally, ER diagrams
contribute to the development of a systematic and standardized classification
system, promoting consistency and clarity in plant disease research and
management. Overall, the ER diagram serves as a foundational tool for designing
a robust and coherent plant disease classification system, facilitating effective
data modeling and enhancing the understanding of complex relationships within
the domain.
33
Fig 6.4.1 ENTITY RELATIONSHIP DIAGRAM
34
6.5 ACTIVITY DIAGRAM
Activity diagrams are graphical representation of workflows of stepwise
activities and actions with support for choice, iteration, and concurrency. In the
UML, activity diagrams can be used to describe the business and operational
step-by-step workflows of components in a system. An activity diagram shows
the overall flow of control. An activity diagram is a type of UML diagram that
models the flow of activities or processes in a system or business process. It is
often used to illustrate the steps involved in a use case or business process. An
activity diagram typically consists of nodes and edges, where the nodes represent
the activities or tasks and the edges represent the flow or sequence of activities.
They can be used to model both simple and complex processes, and can be
helpful in identifying potential issues or inefficiencies in a system or business
process. Activity diagrams can also include decision points, loops, and concurrent
activities. They can be used to model both simple and complex processes, and can
be helpful in identifying potential issues or inefficiencies in a system or business
process.
35
Fig 6.5.1 ACTIVITY DIAGRAM
36
CHAPTER 7
TESTING
7.1 SYSTEM TESTING
When a system is developed, it is expected that it performs properly. In
practice, however, some errors always occur. The main purpose of testing an
information system is to find the errors and correct them. A successful test is one,
which find an error. The main objectives of the system testing are
To ensure during the operation that the system will perform as per
specified in the design phase.
To make sure that the system meets user requirements during operations.
To verify that the controls incorporated in the system functions as
intended.
To see that if correct inputs are fed into the system, it provides perfect
output.
To verify that during operation incorrect input processing and output will
be deleted.
Software testing is a critical element of software quality assurance and represents
the ultimate review of specification, design and coding. If the testing conducted
successfully, it will uncover errors in the software. As a secondary benefit, testing
demonstrates that the software functions appear to be working according to
specification and that performance requirements appear to have been made.
The scope of the system test should include both manual operations and computer
operations system testing is comprehensive evaluation of the programs, manual
procedures, computer operations and controls.
System testing is the process of checking if the developed system is working
according to the original objectives and requirements. All testing needs to be
conducted in accordance to the test conditions specifies earlier.This will ensure
that the test coverage meets the requirement and that testing is done in semantic
manner. System testing accounts for the largest percentage of technical effort in
the software development phase.
37
There are three aspects of system testing:
Unit testing
Validation testing
Sub System testing
38
is that the validation succeeds when the software functions in the manner that can
be reasonably expected by the user. When an user enters incorrect inputs it
should not display error messages, instead it should display helpful messages
enabling user to use the tool properly. The tool is tested with test data as well as
live data and has been found to work properly in the networked environment.
Validation is Quality assurance process of establishing evidence that provides a
high degree of assurance that a product, service, or system accomplishes its
intended requirements. This often involves acceptance of fitness for purpose with
end users and other product stakeholders. For example, when the user skips the
username it shows an error message asking for username.
39
7.3 TEST CASE
A test case, in software engineering, is a set of conditions or variables under
which a tester will determine whether an application, software system or one of
its features is working as it was originally established for it to do. The mechanism
for determining whether a software program or system has passed or failed such a
test is known as a test oracle. In some settings, an oracle could be
a requirement or use case, while in others it could be a heuristic. It may take
many test cases to determine that a software program or system is considered
sufficiently scrutinized to be released. Test cases are often referred to as test
scripts, particularly when written - when they are usually collected into test
suites.
Ideally, each test case is independent from the others: substitutes like method
stubs, mock objects, fakes and test harnesses can be used to assist testing a
module in isolation. Unit tests are typically written and run by software
developers to ensure that code meets its design and behaves as intended. Its
implementation can vary from being very manual to being formalized as part
of build automation.
In order to fully test that all the requirements of an application are met, there
must be at least two test cases for each requirement: one positive test and one
negative test. If a requirement has sub-requirements, each sub-requirement must
have at least two test cases. Keeping track of the link between the requirement
and the test is frequently done using a traceability matrix. Written test cases
should include a description of the functionality to be tested, and the preparation
required to ensure that the test can be conducted.
40
CHAPTER 8
41
8.1.2 ECONOMICAL FEASIBILITY
42
8.2 CONCLUSION
43
APPENDIX A
CODING:
Index.php
<?php
session_start();
include('db.php');
if(isset($_POST['submit'])) {
$Nitrogen = $_POST['N'];
$Phosporus = $_POST['P'];
$potassium = $_POST['K'];
$temperature = $_POST['temperature'];
$humidity = $_POST['humidity'];
$ph = $_POST['ph'];
$rainfall = $_POST['rainfall']
// Correct SQL query formation using AND operator
$qry = mysqli_query($conn, "SELECT * FROM mytable WHERE N='$Nitrogen' AND
P='$Phosporus' AND K='$potassium' AND temperature='$temperature' AND
humidity='$humidity' AND ph='$ph' AND rainfall='$rainfall'");
$row = mysqli_fetch_array($qry);
if($row) {
$_SESSION['crop'] = $row['crop'];
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('submitted Successfully')
window.location='predictedcrop.php';
</SCRIPT>");
} else {
44
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('please enter datas')
window.location='#';
</SCRIPT>");
}
}
?>
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="assets/img/favicons/apple-touch-
icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicons/favicon-
32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicons/favicon-
16x16.png">
<link rel="shortcut icon" type="image/x-icon" href="assets/img/favicons/favicon.ico">
<link rel="manifest" href="assets/img/favicons/manifest.json">
<meta name="msapplication-TileImage" content="assets/img/favicons/mstile-150x150.png">
<meta name="theme-color" content="#ffffff">
<link href="assets/css/theme.min.css" rel="stylesheet" />
<style>
body {
background-color: #f8f9fa;
}
.form-container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
padding: 20px;
}
</style>
45
</head>
<section class="py-0" id="header">
<div class="bg-holder d-none d-md-block" ></div>
<!--/.bg-holder-->
<div class="bg-holder d-md-none" ></div>
<!--/.bg-holder-->
<div class="container">
<div class="row align-items-center min-vh-75 min-vh-lg-100">
<div class="col-md-7 col-lg-6 col-xxl-5 py-6 text-sm-start text-center">
<h1 class="mt-6 mb-sm-4 fw-semi-bold lh-sm fs-4 fs-lg-5 fs-xl-6">CROP <br class="d-block
d-lg-block" />Prediction</h1>
<h5 class="mb-0 fw-bold text-success">Find out the most suitable Fertilizer for the Crop</h5>
<!-- Main content goes here -->
<form name="addDataForm" action="" method="post"> <!-- Changed form name to
"addDataForm" -->
<table>
<tr>
<td>Nitrogen</td>
<td><input type="text" name="N"></td>
</tr>
<tr>
<td>Phosphorus</td>
<td><input type="text" name="P"></td>
</tr>
<tr>
<td>Potassium</td>
<td><input type="text" name="K"></td>
</tr>
<tr>
<td>Temperature</td>
<td><input type="text" name="temperature"></td>
</tr>
<tr>
<td>Humidity</td>
<td><input type="text" name="humidity"></td>
</tr>
46
<tr>
<td>PH value</td>
<td><input type="text" name="ph"></td>
</tr>
<tr>
<td>Rainfall</td>
<td><input type="text" name="rainfall"></td>
</tr>
<td colspan="2"><input type="submit" name="submit" value="Submit"></td>
</tr>
</table>
</form>
</div>
<div class="col-md-7 col-lg-6 col-xxl-5 py-6 text-sm-start text-center">
<h1 class="mt-6 mb-sm-4 fw-semi-bold lh-sm fs-4 fs-lg-5 fs-xl-6">Fertilizer Predict</h1>
</div>
</div>
</div>
</section>
<section class="py-0" id="contact">
<div class="bg-holder" style="background-image:url(assets/img/illustrations/footer-
bg.png);background-position:center;background-size:cover;"></div>
<!--/.bg-holder-->
<div class="container">
<div class="row ">
47
none" href="#"><img class="d-inline-block align-top img-fluid" src="assets/img/gallery/logo-
icon.png" alt="" width="40" /><span class="text-theme font-monospace fs-3 ps-2">Crop
Yield</span></a></div>
<div class="col-12 col-sm-8 col-md-6">
<p class="fs--1 text-dark my-2 text-center text-md-end">CROP YIELD MANAGEMENT
SYSTEM </p>
</div>
</div>
</div>
</section>
</main>
<script src="vendors/@popperjs/popper.min.js"></script>
<script src="vendors/bootstrap/bootstrap.min.js"></script>
<script src="vendors/is/is.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=window.scroll"></script>
<script src="assets/js/theme.js"></script>
<link href="https://fonts.googleapis.com/css2?
family=Chivo:wght@300;400;700;900&display=swap" rel="stylesheet">
</body>
</html>
<?php
session_start();
include('db.php');
if(isset($_POST['submit'])) {
$Nitrogen = $_POST['N'];
$Phosporus = $_POST['P'];
$potassium = $_POST['K'];
$temperature = $_POST['temperature'];
$humidity = $_POST['humidity'];
$ph = $_POST['ph'];
$rainfall = $_POST['rainfall'];
// Correct SQL query formation using AND operator
$qry = mysqli_query($conn, "SELECT * FROM mytable WHERE N='$Nitrogen' AND
48
P='$Phosporus' AND K='$potassium' AND temperature='$temperature' AND
humidity='$humidity' AND ph='$ph' AND rainfall='$rainfall'");
$row = mysqli_fetch_array($qry);
if($row) {
$_SESSION['crop'] = $row['crop'];
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('submitted Successfully')
window.location='predictedcrop.php';
</SCRIPT>");
} else {
echo ("<SCRIPT LANGUAGE='JavaScript'>
window.alert('please enter datas')
window.location='#';
</SCRIPT>");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Crop Yield Prediction</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.3.0/css/
bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/
css/all.min.css">
<style>
body {
background-color: #f8f9fa;
}
.form-container {
background-color: #fff;
border-radius: 10px;
49
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
padding: 20px;
}
</style>
</head>
<div class="container my-5" style="padding-top:100px;">
<div class="row justify-content-center">
<div class="col-md-6">
<div class="form-container">
<h2 class="text-center mb-4">Crop Prediction</h2>
<form name="addDataForm" action="" method="post">
<div class="mb-3">
<label for="N" class="form-label">Nitrogen</label>
<input type="text" class="form-control" id="N" name="N">
</div>
<div class="mb-3">
<label for="P" class="form-label">Phosphorus</label>
<input type="text" class="form-control" id="P" name="P">
</div>
<div class="mb-3">
<label for="K" class="form-label">Potassium</label>
<input type="text" class="form-control" id="K" name="K">
</div>
<div class="mb-3">
<label for="temperature" class="form-label">Temperature</label>
<input type="text" class="form-control" id="temperature" name="temperature">
</div>
<div class="mb-3">
<label for="humidity" class="form-label">Humidity</label>
<input type="text" class="form-control" id="humidity" name="humidity">
</div>
<div class="mb-3">
<label for="ph" class="form-label">PH value</label>
<input type="text" class="form-control" id="ph" name="ph">
</div>
<div class="mb-3">
50
<label for="rainfall" class="form-label">Rainfall</label>
<input type="text" class="form-control" id="rainfall" name="rainfall">
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</div>
</form>
</div>
</div>
<div class="col-md-6">
<h2 class="text-center mb-4">Fertilizer Predict</h2>
<img src="assets/img/gallery/crops.jpg" class="img-fluid rounded" alt="Crops">
</div>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/js/bootstrap.bundle.min.js"></
script>
</body>
</html>
Fertilizerpredict.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Crop Yield Prediction</title>
51
<!-- Stylesheets -->
<link href="assets/css/theme.min.css" rel="stylesheet" />
<style>
body {
font-family: Arial, sans-serif;
background-color: #f8f9fa;
}
.hero-section {
background-color: #f8f9fa;
padding: 100px 0;
}
.hero-content {
max-width: 800px;
margin: 0 auto;
text-align: center;
}
.hero-content h1 {
font-size: 2.5rem;
font-weight: 600;
margin-bottom: 20px;
color: #343a40;
}
.hero-content p {
font-size: 1.1rem;
margin-bottom: 30px;
color: #6c757d;
}
.btn-home {
display: inline-block;
padding: 12px 30px;
font-size: 1.2rem;
font-weight: 600;
text-transform: uppercase;
background-color: #28a745;
color: #fff;
border: none;
52
border-radius: 5px;
transition: background-color 0.3s ease;
text-decoration: none;
}
.btn-home:hover {
background-color: #218838;
}
.container {
padding: 0 15px;
}
.form-container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
padding: 40px;
margin-bottom: 40px;
}
.form-container h1 {
font-size: 2rem;
margin-bottom: 20px;
color: #343a40;
}
.form-container label {
font-size: 1rem;
font-weight: 500;
color: #495057;
}
.form-container select {
width: 100%;
padding: 10px;
margin-top: 8px;
margin-bottom: 20px;
font-size: 1rem;
border: 1px solid #ced4da;
border-radius: 5px;
color: #495057;
53
}
.form-container input[type="submit"] {
display: inline-block;
padding: 10px 20px;
font-size: 1rem;
font-weight: 600;
text-transform: uppercase;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.form-container input[type="submit"]:hover {
background-color: #0056b3;
}
.image-container {
text-align: center;
margin-top: 40px;
}
.image-container img {
max-width: 100%;
border-radius: 10px;
}
.footer {
background-color: #343a40;
color: #fff;
padding: 20px 0;
text-align: center;
}
.footer p {
margin: 0;
}
</style>
</head>
54
</ul>
</div>
</div>
</nav>
<!-- Main Content -->
<main class="main">
<!-- Hero Section -->
55
</div>
</div>
<div class="col col-lg-6">
<div class="image-container">
<img src="assets/img/gallery/fertilizer.jpg" alt="Fertilizer" width="600">
</div>
</div></div>
</div>
</section>
</html>
Fertilizer_data.php
<?php
session_start();
include('db.php');
return isset($fertilizationDetails[$crop]) ? $fertilizationDetails[$crop] :
}
if(isset($_POST['submit'])) {
$selectedCrop = $_POST['crop']; // Get the selected crop from the form
echo "<script>
window.alert('Fertilization Details for $selectedCrop: $fertilizationDetails');
56
window.location.href = 'fertilizerpredict.php';
</script>";
}
</ul>
</div>
</div>
</nav>
<!-- Header Section -->
<section id="header">
<div class="container">
<div class="row align-items-center min-vh-75 min-vh-lg-100">
<div class="col-md-12 col-lg-12 col-xxl-12 py-12 text-sm-start text-center">
<h1 class="mt-12 mb-sm-12 fw-semi-bold lh-sm fs-4 fs-lg-5 fs-xl-6">Pesticide
Recommendation</h1>
<?php
if ($result && $result->num_rows > 0) {
echo '<table class="image-table">
<thead>
<th>ID</th>
<th>Image Name</th>
<th>Image</th>
<th>Recommendation</th>
</thead>
<tbody>';
while ($row = $result->fetch_assoc()) {
$imageURL = 'uploads/' . $row["file_name"];
echo '<tr>
<td>' . $row['id'] . '</td>
<td>' . $row['file_name'] . '</td>
<td><img src="' . $imageURL . '" alt="Image" /></td>
<td>' . $row['recommendation'] . '</td>
</tr>';
}
echo '</tbody></table>';
} else {
echo "0 results";
57
}
?>
</div>
</div>
</div>
</section>
<!-- Footer Section -->
<section class="py-0" id="contact">
<div class="bg-holder" style="background-image:url(assets/img/illustrations/footer-
bg.png);background-position:center;background-size:cover;"></div>
<div class="container">
<div class="row">
<div class="row flex-center py-5">
<div class="col-12 col-sm-8 col-md-6 text-center text-md-start">
<a class="text-decoration-none" href="#">
<img class="d-inline-block align-top img-fluid" src="assets/img/gallery/logo-icon.png" alt=""
width="40" />
<span class="text-theme font-monospace fs-3 ps-2">Crop Yield Prediction</span>
</a>
</div>
<div class="col-12 col-sm-8 col-md-6">
<p class="fs--1 text-dark my-2 text-center text-md-end">CROP YIELD MANAGEMENT
SYSTEM </p>
</div>
</div>
</div>
</div>
</section>
<!-- JavaScripts -->
<script src="vendors/@popperjs/popper.min.js"></script>
<script src="vendors/bootstrap/bootstrap.min.js"></script>
<script src="vendors/is/is.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=window.scroll"></script>
<script src="assets/js/theme.js"></script>
<link href="https://fonts.googleapis.com/css2?
family=Chivo:wght@300;400;700;900&display=swap" rel="stylesheet">
58
</body>
</html>
APPENDIX B
SCREENSHOTS
59
Fig B.1 : Home
60
Fig B.4 : User DashBoard
61
Fig B.6 : Predicted Crop
62
Fig B.8 : Fertilization Details
64
REFERENCES
[1] Bendre, M. R., Thool, R.C., Thool, V. R., “Big Data in Precision
Agriculture : Weather Forecasting for Future Agriculture”, 1 st International
Conference on Next Generation Computing Technologies, pp.744-750, 2015
.
[2] Grajales, D.F.P., Mosquera, G.J.A, Mejia, F., Piedrahita, L.C., Basurto,
C., “Crop-Planning, Making Smarter Agriculture With Climate Data”,Fourth
International Conference on Agro-GeoInformatics, pp.240-244, 2015.
65
[5] Pavan Patil, Virendra Panpatil, Prof. Shrikant Kokate, “Crop Prediction
System using Machine Learning Algorithms”, International Research Journal of
Engineering and Technology, Feb 2020.
[6] Raval Agrawal, H., Agrawal, P., “Review on Data Mining Tools”,
International Journal of Innovative Science, Engineering & Technology, Vol. 1,
Issue 2, pp.52-56, 2014.
[7] Sabri Arik, Tingwen Huang, Weng Kin Lai, Qingshan Liu , “Soil Property
Prediction: An Extreme Learning Machine Approach” Springer, vol. 3, Issue
4,666-680,2015.
[8] Shivnath Ghosh,Santanu Koley, “Machine Learning for Soil Fertility and
Plant Nutrient Management using Back Propagation Neural Networks”
IJRITCC, vol. 2, Issue 2,292-297,2014.
[9] Tan, L., “Cloud-based Decision Support and Automation for Precision
Agriculture in Orchards”, ScienceDirect, pp. 330-335, IFAC–Papers OnLine 49-
16, pp.330-335, 2016.Zhihao Hong,Z. Kalbarczyk,R. K. Iyer, “A Data-Driven
Approach to Soil Moisture Collection and Prediction” IEEE Xplore,vol. 2, Issue
2,292-297,2016.
66
67
68