Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

RAINFALL PREDICTION USING MACHINE

LEARNING
2022 First International Conference on Artificial Intelligence Trends and Pattern Recognition (ICAITPR) | 978-1-6654-2521-6/22/$31.00 ©2022 IEEE | DOI: 10.1109/ICAITPR51569.2022.9844203

Akash Gupta Hitesh Kumar Mall Janarthanan.S


School of Computing Science School of Computing Science School of of Computing
And Engineering And Engineering Science
Galgotias University Galgotias University And Engineering,
Greater Noida, UP, India Greater Noida, UP, India Galgotias University
Email: ag2443593@gmail.com Greater Noida,UP,India

Abstract— Rainfall forecasting is a single ofdifficult and


unpredictable undertakings that has a major influence on human
society. Predictions that are accurate and timely can help to avert
human and financial loss. This study contains a series of
experiments that include the utilisation ofbasic machine learning
techniques to build Weather forecasting models that estimate
whether it will rain in major cities tomorrow based on the day's
meteorological data.This comparative research looks at three
aspects of modelling inputs, modelling methodologies, and pre-
processing procedures.The findings demonstrate how different
machine learning systems perform on a range of assessment
parameters, as well as their capacity to forecast rainfall using
weather data analysis. Agriculture is crucial to India's survival.
The importance of rainfall in agriculture cannot be overstated.
Rainfall forecasting has been a key problem in recent years.
Individuals can be more aware of the weather and make more
educated judgments by predicting rainfall. Fig. 1. Google Trends on Fake News

Index Terms—Rainfall prediction, parameters, However, rainfall forecast and weather updates benefit with in handling
Review analysis, Machine Learning, Prediction System. of macro-level issues like floods and agricultural challenges caused by
inadequate or severe rainfall, as well as micro-level concerns like
I. INTRODUCTION starvation. Rainfall forecasting might also benefit folk's health and
Rainfall has a crucial part in the evolution of fauna wellbeing by giving them information regarding rainfall patterns and
and plants in the natural world. It is essential for forecasting rainfall through techniques like spontaneous forest, vector
humans, animals, plants, and other living things. support classifier, and others. Rainfall predictions can assist individuals
Water is regarded as one of the world's most valuable in coping with hot, humid conditions. In the modern world,
natural resources.and it is utilised extensively in technological advancements have opened up more opportunities for
agriculture and farming. Changing weather invention and creativity. Despite the fact that the current difficulties are
patternsand growing greenhouse gas emissions have most probably the outcome of technical breakthroughs, it is vital to
comprehend the variety of possibilities and opportunities that
made it more difficult for mankind and the rest of the
technology innovation has offered to people.Moreover, inaccurate or
globe to get enough rain to satisfy their demands and
inadequate rainfall forecasting is a cause of worry in water resource
continue to use it in their daily lives. As a result, it's
management. Accurate and exact rainfall forecasts may help with not
become increasingly important to track shifting only the effective and economical use of resources, but also the
rainfall patterns and forecast rain.Our objective of this preparation of event initiatives and plans. It is vital to develop and
research is to forecast rainfall through arbitrary maintain a system which will help in accurate estimates and offer users
forests, vector support classifiers, and other with quick access to this information.
techniques. Rainfall forecasting may help with not
only the research of shifting rain patterns, but also the
II. OBJECTIVE
preparation of preventative actions in the event of a
disaster, as well as the crisis management. Global The objective of study is to implement rainfall prediction with machine
warming is caused by increased Cfcs emission from learning techniques such as random forest, Decision tree, logistic
regression , neural network.
refrigerator, air conditioning units, sprays, and printer,
among other regular items. Temperatures are causing
climate change.
Authorized licensed use limited to: Indian Institute of Technology - Jodhpur. Downloaded on September 25,2023 at 17:38:20 UTC from IEEE Xplore. Restrictions apply.
A. Data Retrieval
Kaggle/Twitter appears to be our main data source. After
III. METHODOLOGY you've created a Twitter Developer account,we were granted
Response-based prediction often elicits intense feelings, and as privileges to begin harvesting tweets. We used a variety of
a result, it spreads swiftly on social media. The news' keywords to extract tweets on rain, weather, and climate.
credibility is determined using a response-based method that Information on the user and the tweet was also retrieved, as
considers past data replies. There are two sections to this well as the user's ID, username, tweet text, andif the user's
project. The greater posterior probability approach was used to status was checked Our decision variable was the user-verified
forecast the weather in the first phase. Regardless of the fact column, with the assumption that if a user-verified account
the accuracy scores improved, we determined that this strategy produced a tweet, it was most likely true news. Consumers are
was useless.By assessing the behavior to certain weather frequently supposed to trust everything communicated
inside this second phase, we devised a strategy for more through these verified accounts. As a result, it's natural that
correctly identifying showers." Several Sci- kit packages were before granting a verified blue tick to a user's profile, Twitter
utilised in this Python-based project. Python has a significant goes through a rigorous vetting procedure. Users who wish to
number of Machine Learning extensions and modules. The validate his accounts must go through a lengthy process in
Sci-Kit Learn module is the ideal place to go for ML which Twitter investigates the person's past and authenticates
evaluation because it offers access to almost all types of them. In essence, we collect information from a variety of
machine learning for Python. sources and edit it ourselves.. Name, text, and label are
included in the provided data set. The header appears in the
title, the text provides the data, and the label indicates if the
information is correct or incorrect.

B. Data Pre-processing
In this study, we're investigating weather forecasting. The
main objective of the research is to apply machine learning to
predict rainfall with high accuracy and precision. As a
consequence, the research contains and analyses the source
data during the pre-processing phase, and then uses this data
during the stimulating or processing phase to forecast the
output in an effective and efficient manner. For statistics,
Erbil, Nicosia, and Famagusta's metrological departments
were consulted. The information from the various
meteorological departments is collected once a year, as this
study will also look at earlier rainfall predictions.Important
rainfall elements are included in the data. Temperatures, wind
direction, prevailing winds, barometric pressure, and moisture
are all taken into account. For Erbil, Cyprus, and Famagusta,
each precipitation parameter is investigated separately. The
statistical data gathered in this study will be used to translate
the result into a rainfall forecast. Machine-learning algorithms
are used to process the data.

C. TDFVectorizer
Fig. 2. Methodology
The acronym TF-IDF stands for Term Frequency Rate. This
is a common method for transforming text into a meaningful
numerical representation, which is then used to train a
machine learning system.

D. Machine Learning Algorithms


Inside this model, we apply a variety of algorithms that are
extremely effective for identifying rainfall forecast and
supporting us in reaching the correct classification result for
the data in the provided data set.We use routinessuch as
random forest, regression models, decision tree, and neural
network.

Authorized licensed use limited to: Indian Institute of Technology - Jodhpur. Downloaded on September 25,2023 at 17:38:20 UTC from IEEE Xplore. Restrictions apply.
(i) Random forest algorithm: -Instead of focusing on a
single tree structure, the confusion matrix utilizes this
same forecast by each tree and anticipates the correct
outcome predicated just on majority votes of
predictions." Rf is a classifier that "uses a decision
tree on different sets of a set of data and averaged
nearly them to improve the forecasting ability of that
dataset."'

(ii) Logistic Regression: This technique uses a set of


independent variables to forecast a categorical
dependent variable. Logistic regression is used to
Fig .3. Data successfully show
predict the outcomes of categorical variables. As a
result, the output has to be categorical or discrete in
both cases. It can also be Yes or No, Zero or One,
True or False, and so on, but instead of exact values
like 0 or 1, it gives probability numbers that are
somewhere in the middle.

(iii) Decision Tree algorithm: -Decision Trees are


although supervised learning techniques can be used
to solve classification and regression problems, they
are most typically utilised to solve classification
problems. In this tree-structured classifier, internal
nodes hold dataset properties, branches offer rule
base, and each leaf node represents a conclusion. A
Decision tree is made up of two nodes: the Leaf Node
and the Decision Node..

(iv) Neural Network :- Artificial Neural Network (ANN)


is a computing method that captures a wide range of Fig.4. RainTomorrow indicator (unbalanceDataset).
products that are coupled in some way to allow
connection between the units. It is also known as
"artificial neural network.".

E. Training TestingModel
Following the introduction of the parameters of each
methodnetwork, the data must be tested using supervised
learning. The algorithm use trained data to extract
characteristics from the dataset. The quality of our generated
model is then assessed using performance measures such as
accuracy, reliability, f1 measure, and recollection.It's also
known as the confusion matrix.’

IV. RESULT
The findings of on top on model demonstrate how effective the
response is at distinguishing between true and fake
information. The outcomes of the research of the model's Fig.5. RainTomorrow indicator (balanceDataset).
operation are listed below.

Authorized licensed use limited to: Indian Institute of Technology - Jodhpur. Downloaded on September 25,2023 at 17:38:20 UTC from IEEE Xplore. Restrictions apply.
VI. CONCLUSION

Rainfall is among nature's most importantoccurrences that has an


impact on all living creatures, not just humans. Because of
shiftingChanges in climate conditions and rainfall cycles are
occurring, as well as the earth's temperature rising.However, a
system that predicts rainfall using artificial intelligence and neural
networks could help solve these problems and meet demand, which
is already common in modern technology, is necessary. The study's
purpose was to create a machine-learning-based prediction method
that could correctly and effectively estimate monthly rainfall with
the least amount of error.The research looked at rainfall data from a
variety of locations as well as different Machine Learning methods
including randomized forest and support vector. To evaluate and
Fig.6, Logistic Regression Accuarcy verify the training data, a comparison of data and expected data is
employed. To obtain a more accurate and precise outcome
prediction, the system employed feature extraction.

VII. ACKNOWLEDGMENT
We required the assistance and direction of a few notable individuals
in order to fulfil our mission, and we owe them our appreciation.
We're quite proud of ourselves for doing our task. Mr..S Janarthanan,
Project Mentor, University of Galgotia's, is to be thanked for exposing
us to work methodology and providing us with excellent assignment
aid. Throughout many consultations, his regard for the "surrounding
structures" was evident.We'd want to thank everyone who has assisted
us, either directly and indirectly, in completing this project. Many
individuals, especially students and members of the team, have
offered constructive feedback on this proposal, motivating us to better
our objective. We appreciate everyone's direct and indirect
Fig.7. Decision Tree Accuarcy contributions to the completion of our project. Finally, we'd want to
express our gratitude to our kind parents for everything they've
We got different accuracy by using different algorithms, as accomplished for us.
you see within the outcome.
REFERENCES

1. Abhishek,K.,Kumar,A.,Ranjan,R.,&Kumar,
V. ANALYSIS THERESULT
S. (2012). A Rainfall Prediction Model using
Artificial Neural Network. IEEE Control and
The graph here depicts the model's accuracy in determining System Graduate Research Colloquium, 1-5.
if it is perfect. The model is absolutely hooked to accuracy in
machine learning, meaning that our model is perfectly good if 2. Agnihotri, G., & Panda, J. (2014). Comparison
accuracy is nice. Using these algorithms, we were able to get a of Rainfall from Ordinary and Automatic Rain
fairly accurate rainfall prediction. We ran these algorithms Gauges in Karnataka. Mausam, 65(4),1-8.
several times to observe how the accuracy varied, but the
results have always been accurate. 3. MuttalebAlhashimi, S. A. (2014). Prediction ofMonthly
Rainfall In Kirkuk Using Artificial Neural Network and
Time Series Model. Journal of Engineering and
Development, 18(1),1-12.

4. Mittal, P., Chowdhury, S., Roy, S., Bhatia, N., &


Srivastav, R. (2012). Dual Artificial Neural Network for
Rainfall-Runoff Forecasting. Journal of Water Resource
and Protection, 4(12),1-4.

Table 1. Accracy Table

Authorized licensed use limited to: Indian Institute of Technology - Jodhpur. Downloaded on September 25,2023 at 17:38:20 UTC from IEEE Xplore. Restrictions apply.
5. Deepak Ranjan Nayak, Amitav Mahapatra and
Pranati Mishra, "A Survey on Rainfall Prediction
using Artificial Neural Network", International
Journal of Computer Applications, vol. 72, no. 16,
pp. 0975-8887, June2013

6. Nicholls, N.: Atmospheric and climatic hazards:


Improved monitoring and predictionfor disaster
mitigation. Natural Hazards 23(23), 137155(2001)

7. Omotosho, J. B., Balogun, A., &Ogunjobi, K.


(2000). Predicting monthly and seasonal rainfall,
onset and cessation of the rainy season in west
africa using only surface data. Internationaljournal
of climatology, 20,1-16

8. Shaikh, L., &Sawlani, K. (2017). A Rainfall


Prediction Model Using Articial Neural Network.
International Journal of Technical Research and
Applications, 5(2),1-3.

9. Sivakumar, M. V. (2006). Climate prediction and


agriculture: current status and future challenges.
Climate research, 33(3-17),1-12.

10. Qian, W., Kang, H.-S., & Lee, D.-K. (2002).


Distribution of seasonal rainfall in the East Asian
monsoon region. Theoretical and Applied
Climatology, 73(3-4), 1-9.

Authorized licensed use limited to: Indian Institute of Technology - Jodhpur. Downloaded on September 25,2023 at 17:38:20 UTC from IEEE Xplore. Restrictions apply.

You might also like