Professional Documents
Culture Documents
MAGESH.S - 30022P15016
MOHAN.D - 30022P1501
RAVINDARAN.P - 30022P15022
of
October - 2023
1
BONAFIDE CERTIFICATE
Certified that this project report “ RAGI YEILD PREDICTION ” is the bonafide
work of “ MAGESH.S ” who carried out the project work under my supervision.
Certified further that to the best of my knowledge the work reported herein does not
form part of any other thesis or dissertation on the basis of which a degree or award
was conferred on an earlier occasion on this or any other candidate.
2
BONAFIDE CERTIFICATE
3
BONAFIDE CERTIFICATE
4
TABLE OF CONTENTS
2 MODULES
3.1 Advantages
6 ACTIVITY DIAGRAM
7 SEQUENCE DIAGRAM
9 IMPLEMENTATION
10 REPORT
5
11 CONCLUSION
12 REFERENCE
6
Ragi Yield Prediction using Machine Learning in Vellore.
ABSTRACT :
The impact of climate change in India, most of the agricultural crops are being badly
affected in terms of their performance over a period of the last two decades. Predicting the crop
yield in advance of its harvest would help the policy makers and farmers for taking appropriate
measures for marketing and storage. This project will help the farmers to know the yield of their
crop before cultivating onto the agricultural field and thus help them to make the appropriate
decisions. It attempts to solve the issue by building a prototype of an interactive prediction
system. Implementation of such a system with an easy-to-use web based graphic user interface
and the machine learning algorithm will be carried out. The results of the prediction will be made
available to the farmer. Thus, for such kind of data analytics in crop prediction, there are
different techniques or algorithms, and with the help of those algorithms we can predict crop
yield. Random forest algorithm is used. By analysing all these issues and problems like weather,
temperature, humidity, rainfall, moisture, there is no proper solution and technologies to
overcome the situation faced by us. In India, there are many ways to increase the economic
growth in the field of agriculture.
Key Words :
Crop yield forecasting, Agricultural data analysis ,Machine learning models ,Crop productivity
modeling.
These keywords encompass the key aspects and methodologies used in predicting crop yields to
help researchers and practitioners find relevant literature and resources on the subject.
7
LISTOFFIGURES
1 UML DIAGRAM
2 DATAFLOW DIAGRAM
3 USECASE DIAGRAM
4 ACTIVITY DIAGRAM
5 SEQUENCE DIAGRAM
8
1.Introduction :
In developing countries, farming is considered as the major source of revenue for many people.
In modern years, the agricultural growth is engaged by several innovations, environments,
techniques and civilizations. In addition, the utilization of information technology may change
the condition of decision making and thus farmers may yield the best way. For decision making
process, data mining techniques related to the agriculture are used. Data mining is a process of
extracting the most significant and useful information from the huge number of datasets.
Nowadays, we used machine learning approach with developed in crop or plant yield prediction
since agriculture has different data like soil data, crop data, and weather data. Plant growth
prediction is proposed for monitoring the plant yield effectively through the machine learning
techniques. It is also applicable for the automated process of farming is the beginning of a new
era in Bangladesh that will be suitable for the farmers who seek experts to take suggestion
about the appropriate crop on specific location of their land and don’t want to forget any step
of the cultivation throughout the process. Although, the opinion from experts is the most
convenient way, this application is designed to give accurate solution in fastest manner
possible. This research’s main objective is to bring farming process a step closer to the digital
platform.
i. Yield Prediction: This is one of the modules available in the application that enables
the user to view the yield predictions of crops. The user is given two choices here: ‗I
know what to plant‘: This option is for those users who already have a crop in their
mind that they want to grow. When chosen, the user will be given choices of crops that they
must select along with other inputs .i.e., Area and the soil type. After processing the inputs,
the application will return the predicted yield on the user‘s screen. ‗Yet to decide the crop‘:
This option is when the user is not sure between some crops or
has no crop in mind. The user has to input the soil type and the area. The input is again
processed at the back end by the modelled algorithm and the predicted yield is returned to the
user.
9
ii. Fertiliser: This is the second module available. The functionality that this module
provides revolves around whether using fertilisers at a certain point of time would be
recommended or not. As farmers mostly use water soluble fertilisers, it is important that it
doesn‘t rain for 14- 15 days after they use the fertilisers as they may wash off with rain and
the use of the fertilisers will go in vain.
1.2 Objectives:
This project aims at predicting the crop yield at a particular weather condition and
thereby recommending suitable crops for that field. It involves the following steps.
● Collect the weather data, crop yield data, soil type data and the rainfall data and merge these
datasets in a structured form and clean the data. Data Cleaning is done to remove inaccurate,
incomplete and unreasonable data that increases the quality of the data and hence the overall
productivity.
● Perform Exploratory Data Analysis (EDA) that helps in analyzing the complete dataset and
summarizing the main characteristics. It is used to discover patterns, spot anomalies and to get
graphical representations of various attributes. Most importantly, it tells us the importance of
each attribute, the dependence of each attribute on the class attribute and other crucial
information.
● Divide the analysed crop data into training and testing sets and train the model using the
training data to predict the crop yield for given inputs.
● Compare various Algorithms by passing the analysed dataset through them and calculating the
error rate and accuracy for each. Choose the algorithm with the highest accuracy and lowest error
rate.
10
1.4.REQUIREMENTS
1.4.1.Hardware Requirements
System : HP.
Mouse : Logitech.
Ram : 1GB
1.4.2.Software Requirements
Operating system: WINDOWS 10
LITERATURE REVIEW:
To keep up nutrition levels in the soil in case of deficiency, fertilizers are added tosoil. The
standard issue existing among the Indian agriculturists chooseapproximate amount of fertilizers
and add them manually. Excess or deficientextension of fertilizers can harm the plants life and
reduce the yield. This papergives overview of various data mining frameworks used on
cultivating soil datasetfor fertilizer recommendation.
Agriculture is the most critical application area especially in the developing nationslike
India .Use of information technology in agriculture can change the situation ofdecision making
and farmers can yield in better way. Data mining plays aimportant role in decision making on
several aspects with agriculture field. Itexamines about role of data mining in the farming field
and their related work by afew authors in related to agriculture domain. It additionally talks
about on varioudata mining applications in taking care of the several agriculture problems.
Thispaper integrates the work of several authors in a single place so it is valuable forspecialists
to get data of current situation of data mining systems and applicationsin context to farming
field.
11
This paper communicates the idea regarding the making of AgroNutri an androidapplication that
helps in conveying the harvest particular fertilizer amount to beapplied. The idea is to calculate
the measure of NPK composts to be applieddepend on the blanked proposal of the crop of
interest. This application worksdepend on the product chosen by the farmer and that is taken as
input, thusproviding the farmers. The future scope of the AgroNutri is that GPRS can beincluded
so that according to location nutrients are suggested. Further thisapplication would be
incorporated as a piece of the accuracy agriculture whereinsensors can be utilized to discover the
measure of NPK present in the dirt and thatsum can be deducted from the suggestion and giving
us the exact measure ofsupplements to be added.
Agriculture is a field that has been lacking from adaption of technologies and theiradvancements.
Indian agriculturists should be up to the mark with the universalprocedures. Machine learning is
a native concept that can be applied to every fieldon all inputs and outputs. It has effectively
settled its ability over ordinarycalculations of software engineering and measurements. Machine
learningcalculations have improved the exactness of artificial intelligence machinesincluding
sensor based frameworks utilized in accuracy farming. This paper hasevaluated the different uses
of machine learning in the farming area. It additionallygives a knowledge into the
inconveniences looked by Indian farmers and how theycan be resolved using these procedures.
Throughout the following decades humanity will request more food from less landand water
assets. This investigation evaluates the food production effects of fourelective advancement
situations from the Millennium Ecosystem Assessment andthe Special Report on Emission
Scenarios. partialy and jointly considered are landand water supply impacts from population
development, and specialized change,and forests and agriculture demand request shifts from
population development and economic improvement. The income impacts on nourishment
request are
Rural frameworks science creates information that enables analysts to considercomplex issues or
take educated farming choices. The rich history of this sciencerepresents the decent variety of
frameworks and scales over which they work andhave been contemplated. Demonstrating, a
basic apparatus in agrarianframeworks science, has been expert by researchers from an extensive
variety ofcontrols, who have contributed ideas and instruments over six decades. Asagrarian
researchers currently consider the "people to come" models, information,and learning items
expected to meet the inexorably mind boggling frameworksissues looked by society, it is vital to
12
check out this history and its exercises toguarantee that we stay away from re-innovation and
endeavor to think about allelements of related difficulties. To this end, we outline here the
historical backdropof rural frameworks demonstrating and distinguish exercises discovered that
canhelp control the structure and advancement of up and coming age of farmingframework
apparatuses and techniques. Various past occasions joined withgenerally innovative
advancement in different fields have unequivocally added tothe development of farming
framework demonstrating, including improvement ofprocess-based bio-physical models of yields
and domesticated animals, factualmodels dependent on verifiable perceptions, and financial
streamlining andreproduction models at family unit and local to worldwide scales. Attributes of
ruralframeworks models have changed broadly relying upon the frameworks included,their
scales, and the extensive variety of purposes that spurred their advancementand use by specialists
in various controls. Late patterns in more extensive jointeffort crosswise over establishments,
crosswise over orders, and between peoplein general and private segments recommend that the
stage is set for the significantadvances in rural frameworks science that are required for the up
and coming ageof models, databases, learning items and choice emotionally supportive
networks.The exercises from history ought to be considered to help stay away frombarricades
and entanglements as the network builds up this up and coming age ofhorticultural frameworks
models.
2.Modules :
● Metadata
● Data Pre-processing
2.1.Module Description :
13
2.2. Metadata:
All the main data used in the data set are initialized with the number to use in the algorithm it is
like initializing all the details. In this metadata, we are going to initialize all the crop names with
the numbers. This data makes us use the data easily in the algorithm. Hear the metadata of all the
crops is given with a particular number. This number is not duplicated that is one number is
given to one crop, the same number is not given to the other crop. This metadata consists of more
than a hundred crops that grown all over India.
3.UML DIAGRAMS:
UML is simply anther graphical representation of a common semantic model. UML provides a
comprehensive notation for the full lifecycle of object-oriented development.
3.1 ADVANTAGES:
● To represent complete systems using object oriented concepts
● To take into account the scaling factors that are inherent to complex and
● Critical end.
● To creating a modelling language usable by both humans and machines UML defines several
models for representing systems
14
● The class model captures the static structure
2. The data flow diagram (DFD) is one of the most important modeling tools. It is used to model
the system components. These components are the system process, the data used by the process,
an external entity that interacts with the system and the information flows in the system.
3. DFD shows how the information moves through the system and how it is modified by a series
of transformations. It is a graphical technique that depicts information flow and the
transformations that are applied as data moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a system at any level of
abstraction. DFD may be partitioned into levels that represent increasing information flow and
functional detail.
15
Figure:1 (Data Flow Diagram)
16
5.USECASE DIAGRAM:
Use case diagrams overview the usage requirement for system. They are useful for presentations
to management and/or project stakeholders, but for actual development you will find that use
cases provide significantly more value because they describe “the meant” of the actual
requirements. A use case describes a sequence of action that provides something of measurable
value to an action and is drawn as a horizontal ellipse.
Figure:2(Usecase Diagram)
6. ACTIVITY DIAGRAM:
Activity diagram are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency. The activity diagrams can be used to describe
the business and operational step-by-step workflows of components in a system. Activity
diagram consist of Initial node, activity final node and activities in between.
17
Figure:3(Activity Diagram)
18
What data should be given as input?
Methods for preparing input validations and steps to follow when error occur.
7.SEQUENCE DIAGRAM:
Figure:4(Sequence Diagram)
Ragi yield prediction is typically done using various factors such as weather data, soil quality,
historical yield data, and more. It involves a sequence of steps, including data collection,
preprocessing, and modeling. Here's a simplified sequence:
19
Data Collection: Gather historical ragi yield data, weather data (temperature, rainfall), soil
information (pH, fertility), and other relevant factors.
Data Preprocessing: Clean and format the data, handle missing values, and perform feature
engineering. This may involve transforming or scaling variables.
Exploratory Data Analysis (EDA): Analyze the data to identify patterns and correlations
between different factors and ragi yield.
Feature Selection: Choose the most relevant features for the prediction model.
Model Selection: Select an appropriate machine learning or statistical model for yield
prediction. Common choices include regression models (linear, nonlinear), decision trees, or
deep learning models.
Model Evaluation: Assess the model's performance using evaluation metrics (e.g., Mean
Absolute Error, Root Mean Square Error) on a validation dataset.
Prediction: Use the trained model to make predictions on the current season's data.
Yield Forecasting: Combine predictions with real-time weather and soil data for yield
forecasting for the upcoming season.
Validation and Testing: Continuously monitor the model's performance against real yield data
to improve its accuracy.
Deployment: Implement the model in a production environment for ongoing yield prediction.It's
important to note that this is a simplified sequence, and the actual process may be more complex,
involving advanced techniques like time series analysis, spatial modeling, and the integration.
20
8.OVERALL SYSTEM DIAGRAM:
Predicting ragi (finger millet) yield involves considering various factors, such as weather
conditions, soil quality, farming practices, and more. Here's an overview of the content for
predicting ragi yield:
21
Data Collection: Collect data on historical ragi yields in the region of interest. This data should
include yield records for several years.
Weather Data: Gather historical weather data, including rainfall, temperature, and humidity.
Weather conditions have a significant impact on crop yield.
Soil Analysis: Conduct soil tests to determine soil quality, pH levels, and nutrient content. Soil
health affects crop productivity.
Crop Variety: Consider the ragi variety being grown, as different varieties may have varying
yield potentials.
Farming Practices: Evaluate the farming practices used, such as irrigation, fertilization, and
pest control methods.
Pest and Disease Data: Take into account data on prevalent pests and diseases that can affect
ragi crops.
Satellite Imagery: Use satellite imagery and remote sensing technology to monitor crop health
and growth throughout the season.
Machine Learning Models: Utilize machine learning models, such as regression or neural
networks, to analyze the collected data and predict yield. Feature engineering is crucial to
include relevant factors.
Yield Forecasting: Develop a predictive model that considers the historical data, weather
forecasts, and real-time data to forecast the ragi yield for the upcoming season.
Monitoring and Updates: Continuously monitor the crop throughout the growing season and
update the yield predictions based on changing conditions.
Risk Assessment: Assess potential risks to the crop, such as extreme weather events, and
develop contingency plans.
Communication: Share the yield predictions with farmers, policymakers, and stakeholders to
make informed decisions regarding agricultural planning, resource allocation, and market
predictions.
22
Data Integration: Combine data from various sources, including government agencies, research
institutions, and local farmers, for a comprehensive analysis.
Historical Trends: Analyze historical trends and patterns to identify long-term factors that
influence ragi yield.
Advisory Services: Provide farmers with actionable recommendations based on the yield
predictions to optimize their practices.
By integrating all these elements, you can create a comprehensive system for predicting ragi
yield that can benefit both farmers and the agricultural industry as a whole.
9. IMPLEMENTATION :
import csv
import tkinter.messagebox
root = Tk()
root.geometry('850x800')
root.title("crop selector")
pH = DoubleVar()
temp = IntVar()
var = IntVar()
23
c = StringVar()
c1 = StringVar()
var1 = IntVar()
value1=0
name1="noname"
def doNothing() :
canvas.pack()
label_0.place(x=310, y=53)
csv.register_dialect('myDialect',delimiter=',',skipinitialspace=True)
count=0
posi=0
t=0
maxx=0
t=0
t=t+1
24
t=t+1
t=t+1
t=t+1
if(row[8]==droplist1):
t=t+1
t=t+1
if(t>maxx):
maxx=t
posi=count
print(t)
count=count+1
k=0
if(k==posi):
name1=row[0]
value1=maxx*100/6
k=k+1
25
csvFile.close()
canvas.destroy()
root.destroy()
import extra
extra.fun(value1,name1)
return
def Check():
import popup
popup.popUp()
else:
doNothing()
return
label_0.place(x=310, y=53)
label_1.place(x=250, y=180)
entry_1 = Entry(root)
entry_1.place(x=440, y=180)
label_9.place(x=250, y=440)
entry_9 = Entry(root)
entry_9.place(x=440, y=440)
26
label_2 = Label(root, text="temperature", width=20, font=("bold", 10))
label_2.place(x=250, y=130)
entry_2 = Entry(root)
entry_2.place(x=440, y=130)
label_3.place(x=250, y=230)
radioButt_1.place(x=430, y=230)
radioButt_2.place(x=505, y=230)
radioButt_3.place(x=580, y=230)
label_4.place(x=250, y=280)
'Nagaland','Odisha','Punjab','Rajasthan','Sikkim','Tamil
Nadu','Telengana','Tripura','Uttar Pradesh','Uttarakhand','West Bengal']
droplist.config(width=15)
droplist.place(x=440, y=280)
27
label_8 = Label(root, text="type of soil", width=20, font=("bold", 10))
label_8.place(x=250, y=330)
list2 = ['Alluvial','Black','Loamy','Sandy']
droplist1.config(width=15)
droplist1.place(x=440, y=330)
var2 = IntVar()
var3 = IntVar()
label_5.place(x=250, y=380)
check_1.place(x=430, y=380)
check_2.place(x=505, y=380)
check_3.place(x=580, y=380)
button1.place(x=650, y=500)
root.mainloop()
28
10. REPORT :
29
30
31
32
33
11.CONCLUSION :
34
Developed Model for Crop Yield Prediction is ready to predictthe yield for crops like Ragi, Rice,
and Sugarcane in Mysoreregion. Supported our analysis, model are more accurate if themore
datasets are available. So because of datum increases oursystem will become more and more
accurate. Our systemaccuracy isover the prevailing system.Since we are displaying theends up in
shape of graph with actual and predicted in thegraphical computer program it is easy to match
previous year’sdata. This model will help farmers to grow the crop which isable to give more
yields in order it will be more profitable.
12.References:
1. PATEL, K., & PATEL, H. B. (2023). Multi-criteria Agriculture Recommendation System using
Machine Learning for Crop and Fertilizesrs Prediction. Current Agriculture Research
Journal, 11(1).
2. Karandikar, A. (2023). Review of Crop and Fertilizer Recommendation Systems. Vidhyayana-An
International Multidisciplinary Peer-Reviewed E-Journal-ISSN 2454-8596, 8(si7), 197-210.
3. Dhal, A., Lodhi, D., Gupta, R., Singh, V., Adak, M. I., & Goel, P. K. INTEGRATING ARTIFICIAL
INTELLIGENCE AND MACHINE LEARNING FOR CROP YIELD PREDICTION, FERTILIZER
RECOMMENDATION AND DISEASE DETECTION.
4. Sinha, V., Mishra, P., & Jena, J. J. (2023). Profitable Crop Prediction for the State of Odisha Using
Machine Learning Algorithms. Computational Intelligence in Analytics and Information Systems:
Volume 1: Data Science and AI, Selected Papers from CIAIS-2021, 427.
5. Nicolas, F., Kamai, T., Ben-Gal, A., Ochoa, J., Daccache, A., Ogunmokun, F., &Kisekka, I. (2023).
Assessing salinity impacts on crop yield and economic returns in the Central Valley. Available at
SSRN 4421420.
6. Pradeep, G., Rayen, T. D. V., Pushpalatha, A., & Rani, P. K. (2023, April). Effective Crop Yield
Prediction Using Gradient Boosting To Improve Agricultural Outcomes. In 2023 International
Conference on Networking and Communications (ICNWC) (pp. 1-6). IEEE.
7. Parameswari, P., & Tharani, C. (2023). Crop Specific Cultivation Recommendation System Using
Deep Learning. In Information and Communication Technology for Competitive Strategies (ICTCS
2022) Intelligent Strategies for ICT (pp. 781-787). Singapore: Springer Nature Singapore.
8. Maheswari, M. U., & Ramani, R. (2023, March). A Comparative Study of Agricultural Crop Yield
Prediction Using Machine Learning Techniques. In 2023 9th International Conference on Advanced
Computing and Communication Systems (ICACCS) (Vol. 1, pp. 1428-1433). IEEE.
9. Deepak, N. R., Madhan, A., Abinraj, M., Akram, H. M., & Raghav, H. V. (2023). A Survey on a
Prediction Model for Crop Productivity Optimization and Profit Maximization Using Market Trends
and Topographical Factors. Journal of Advances in Computational Intelligence Theory, 5(2), 13-18.
10. GUPTA, T., MAGGU, S., & KAPOOR, B. (2023). Crop Prediction using Machine Learning.
11. Ashwitha, A., & Latha, C. A. (2022). Crop recommendation and yield estimation using machine
learning. Journal of Mobile Multimedia, 861-884.
12. Timsina, J., Dutta, S., Devkota, K. P., Chakraborty, S., Neupane, R. K., Bista, S., ... & Majumdar,
K. (2022). Assessment of nutrient management in major cereals: Yield prediction, energy-use
efficiency and greenhouse gas emission. Current Research in Environmental Sustainability, 4,
100147.
35
13. Gupta, S., Geetha, A., Sankaran, K. S., Zamani, A. S., Ritonga, M., Raj, R., ... & Mohammed, H. S.
(2022). Machine learning-and feature selection-enabled framework for accurate crop yield
prediction. Journal of Food Quality, 2022, 1-7.
14. Shaik, M. A., Manoharan, G., Prashanth, B., Akhil, N., Akash, A., & Reddy, T. R. S. (2022, May).
Prediction of crop yield using machine learning. In AIP Conference Proceedings (Vol. 2418, No.
1). AIP Publishing.
15. Kumar, R., & Singhal, V. (2022). IoT enabled crop prediction and irrigation automation system
using machine learning. Recent Advances in Computer Science and Communications (Formerly:
Recent Patents on Computer Science), 15(1), 88-97.
16. Janrao, S., & Shah, D. (2022). Return on investment framework for profitable crop
recommendation system by using optimized multilayer perceptron regressor. IAES International
Journal of Artificial Intelligence, 11(3), 969.
17. Teja, M. S., Preetham, T. S., Sujihelen, L., Jancy, S., & Selvan, M. P. (2022, May). Crop
recommendation and yield production using svm algorithm. In 2022 6th International Conference
on Intelligent Computing and Control Systems (ICICCS) (pp. 1768-1771). IEEE.
18. Manivasagam, M. A., Sumalatha, P., Likitha, A., Pravallika, V., Satish, K. V., &Sreeram, S.
(2022). An efficient crop yield prediction using machine learning. International Journal of
Research in Engineering, Science and Management, 5(3), 106-111.
19. Sumathi, M., Rajkamal, M., Raja, S. P., Venkatachalapathy, M., &Vijayaraj, N. (2022). A crop
yield prediction model based on an improved artificial neural network and yield monitoring using a
blockchain technique. International journal of Wavelets, Multiresolution and Information
processing, 20(06), 2250030.
20. Kumar, Y. J. N., Spandana, V., Vaishnavi, V. S., Neha, K., & Devi, V. G. R. R. (2020, June).
Supervised machine learning approach for crop yield prediction in agriculture sector. In 2020 5th
International Conference on Communication and Electronics Systems (ICCES) (pp. 736-741).
IEEE.
36
Ragi Yield Prediction
Group Members :
1.Magesh.S
2.Mohan.D
3.Ravindran
Guide
37