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

Rainfall prediction using ML

The document discusses a rainfall prediction system utilizing machine learning techniques, particularly the Random Forest Classifier, to achieve a prediction accuracy of 94.22% based on historical weather data. It emphasizes the integration of real-time SMS alerts through the Twilio API for timely notifications, which is beneficial for agricultural planning and disaster management. Future developments may include the incorporation of IoT sensors for enhanced data collection and improved prediction capabilities.

Uploaded by

m699599499
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Rainfall prediction using ML

The document discusses a rainfall prediction system utilizing machine learning techniques, particularly the Random Forest Classifier, to achieve a prediction accuracy of 94.22% based on historical weather data. It emphasizes the integration of real-time SMS alerts through the Twilio API for timely notifications, which is beneficial for agricultural planning and disaster management. Future developments may include the incorporation of IoT sensors for enhanced data collection and improved prediction capabilities.

Uploaded by

m699599499
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

RAINFALL PREDICTION USING ML

Vigneshkumar M Dr. K.S.Kannan Harsha vardhan nalleboina


Associate Professor Associate Professor 99220042099
Department of Computer Department of Computer Computer Science and
Science and Engineering, Science and Engineering, Engineering
Kalasalingam Academy of Kalasalingam Academy of Kalasalingam Academy of
Research and Education Research and Education Research and Education,
Krishnankoil, Virudhunagar Krishnankoil, Virudhunagar Krishnankoil
[email protected] [email protected] [email protected]

Devi prasad ponnapula Teja nagendra prasad chakali Ram mohan reddy emani
99220042100 99220041148 99220041066
Computer Science and Computer Science and Computer Science and
Engineering Engineering Engineering
Kalasalingam Academy of Kalasalingam Academy of Kalasalingam Academy of
Research and Education, Research and Education, Research and Education,
Krishnankoil Krishnankoil Krishnankoil
[email protected] [email protected] [email protected]

Abstract:The Random Forest Classifier forecasts the The parameters were further fine-tuned in accordance with
rainfall using historical weather data. The continuous the MBOA for making the accuracy of the forecast better.
data of rainfalls is converted into a binary classification System approaches with a dataset of 25,919 samples achieves
of rain/no rain in order to identify the significant weather maximum prediction accuracy at 94.22% and proves to
conditions preceding probable raining. In the quest to surpass the best known existing techniques. There is real
further optimize the optimality of accuracy and scope for the application of the system in smart city
capability for generalization of this model, it divided the environments for real time applications for rainfall
preprocessed dataset into training sets and testing sets. prediction..[1]
Features that affect rainfall are found, and the
contribution of importance is visualized, so aspects can "A Rain Prediction Using Machine Learning
be understood. Along with the accuracy score, Techniques" is a research paper explaining the application of
classification report and confusion matrix offer machine learning models in rainfall prediction-Multiple
performance metrics that could be used in differentiating Linear Regression (MLR), Support Vector Regression
rainy and non-rainy days. (SVR), Lasso Regression. The authors lay huge emphasis on
This alerting system will be built in through Twilio API the fact that rainfall is nonlinear and the only way to make
in terms of SMS for predictions regarding rainfall, which accurate forecasts would, therefore, be through the
can further be included in the weather alert system. If it significance of agriculture in the long run and preventing
predicts rain, then the model would send a text to the user disastrous occurrences. The dataset used is in a range from
with a message regarding this and also ask the person to 1901 to 2015 and PCA used to reduce features. Experimental
take all the precautionary measures on time. In this results reflect that SVR performs better than MLR in dealing
model, flood monitoring may be applied in agricultural with nonlinearities and yields the most accurate predictions.
planning and, hence, could be applied for controlling [2]
disasters in that real-time rain forecasts are provided and
decisions regarding various tasks are made accordingly. In "Machine Learning Techniques for Rainfall
Future development may add more functions of adding Prediction: A Review," Parmar, Mistree, and Sompura
data and integrating with IoT sensors where data is explore techniques that are applied in machine learning for
automatically gathered. the purpose of rainfall prediction; this paper has high lighting
on the nonlinear nature of data regarding rainfall, which
Keyword's: Rainfall prediction, Random Forest poses challenges. It critiques the statistical and machine
Classifier, weather forecasting, feature importance, Twilio learning models, such as ARIMA, ANN, and SVM, and
API, SMS alert system, flood monitoring, binary remarks that ANN is especially powerful in rainfall
classification, weather data analysis, real-time forecasting as it can handle nonlinear patterns. The paper
notifications further summarizes studies in tabular form according to
accuracy and prediction attributes; it thus concludes that
I. INTRODUCTION
machine learning techniques, and particularly ANN, will be
This paper proposed an FCMM-RPS methodological promising. [3]
framework based on Fuzzy Cognitive Maps, integrating with
a modified version of butterfly optimization algorithm to Edwin Salcedo Aliaga contributed to the paper
model the FCM and then apply it as a Rainfall Prediction "Automatic System for Rainfall Monitoring and Prediction
System. That methodology involved some preprocessing of with IoT and Machine Learning" in the context of a low-cost
weather data and applied a predictive model based on FCM. IoT-based system for monitoring rainfall and related climate
data in Bolivia. Based on Arduino-style weather stations with output from the model purely analytical into actionable form
sensors for rainfall, temperature, humidity, and solar since it allows sending notifications regarding forecasted
radiation, the system sends over GSM/GPRS data to a central rainfall. It therefore makes it a useful decision-making device
web application. In terms of prediction of trends in the in agriculture and also in flood-monitoring and public safety
weather and possible usage in agriculture and disaster applications, where timely information may be crucial for
preparation, it also incorporates machine learning plans and action prevention.
specifically ARIMA. It discusses the dependency of the
system on GSM infrastructure and its plans to upgrade the
existing system. [4] II. LITERATURE SURVEY

The IoT based lava flood detection early warning Optimizing Convolutional Neural Networks for
system consists of two main subsystems which are flood Document Image Classification. The authors compare
detection and disaster communication. The flood detection models optimized for document images with models
system employs a rainfall intensity gauge, modified to optimized for natural images. In an experimental comparison
measure cold lava flows while a vibration sensor is used for of network architectures, input preprocessing, and data
detecting cold lava's presence. The obtained data is analyzed augmentation, the authors show how modifications such as
using a fuzzy decision tree to predict volcanic flood. The shear transformations, larger input sizes, and a tailored
result is then sent to concerned parties using several IoT architecture improve classification accuracy. Here, the CNN
platforms that include SMS, WhatsApp messaging, or radio achieves state-of-the-art accuracy at 91.03% on the RVL-
communication. We run the system in a practical setting on CDIP dataset. Analysis shows that CNNs trained on
Mount Merapi. The trial suggests that the system is able to document images learn spatially specific features for layout
issue the prediction and alert on time which will further elements and thereby improve the performance on
improve disaster preparedness and save lives by issuing document-based tasks. [7]
evacuation as early as possible. [5]
The paper deals with IoT-based EWS, an early warning
system to detect lava floods based on rainfall intensity and
It is a DSS for agriculture using the SMS technology to seismic activities monitoring peripherally surrounding active
update farmers about weather forecasts and agriculture volcanoes. The EWS consists of rain gauges and vibration
information. This web-based system is dedicated to farmers sensors equipped with IoT-connectivity facility for data
living in rural areas supplied with timely and relevant analysis using the Kalman filters and a fuzzy decision tree.
weather forecasts and agricultural information for better Field tests on Mount Merapi, Indonesia, have shown that
planner and decision making to increase productivity. The EWS can detect both rainfall intensities and ground
farmers may set SMS alerts for users to be notified of vibrations, giving warnings to local disaster response teams
weather changes, which will provide farmers with more via SMS texts, WhatsApp, and radio. This would mean that
important climate information that will help to boost a message could be delivered at a rapid pace in order to
agricultural output. [6] reduce the impact of such disaster events in volcanic areas.
[8]

This novel paradigm in the extreme convectional rain


ALGORITHMS USED: precipitations forecast model is further provided. ResNet-
Attention-BiLSTM architecture conquers most of the
The Random Forest Classifier algorithm uses the limitations pointed out with previous techniques: keeping all
Random Forest Classifier to predict rainfall mainly. Random important properties of the radar observation and containing
Forest is an ensemble learning algorithm, which combines residual connections. Attention mechanisms are further
multiple decision trees so as to enhance prediction accuracy brought out to mark important parts in the radar data, and
and robustness. Generally, the individual trees in the forest BiLSTM is used to capture related information according to
make different predictions based on different subsets of data sequences in time. Testing was conducted to see if it was
and features, and then the final prediction is derived by replacing the previous methods that had achieved significant
aggregating the results of these individual trees, mostly with improvements over mean absolute errors as well as stability
a majority vote in classification tasks. This reduces the in predictability at all altitudes. Adding this therefore
likelihood of overfitting, especially with complex datasets. introduces accuracy for instances of worse weather. [9]
In addition, the Random Forest algorithm happens to be a
good choice for this problem since it can handle large Paper Rainfall Prediction System provides for a machine
datasets and determine the feature importance. This feature learning approach to predict rainfall for three dry regions in
importance helps determine which conditions most Sri Lanka: Anuradhapura, Vavuniya, and Maha
significantly affect the probability of rainfall: temperature, Illuppallama. The historical rainfall data for 2021-2023 have
humidity, or atmospheric pressure. This project contains been taken and multiple models like SARIMA, Decision
training the classifier on split weather data for training and Trees, Random Forest, GBR, XGBoost, and LSTM have
test and further assessing the model by metrics such as been applied with GBR coming out as highly above the
accuracy score, classification report, and confusion matrix. others in terms of accuracy and reliability. The GBR model
The usability aspect of inclusivity has been advanced by the performed the best for Vavuniya with an MSE of 7.45, MAE
model being integrated with the Twilio API to provide, in of 1.07, and ( R^2 ) of 0.93. This system scaled up with
real-time, SMS alerts based on predictions. It makes the
MLOps provides practical advantages in agricultural historical stream weather data with current or existing data.
planning and water management for the target areas.[10] This is how the system can interpret weather conditions in a
more complex manner, taking temperature, humidity, and
A metaheuristics-based system for rainfall prediction atmospheric pressure as precursors to rainfall. Feature
using the FCMM-RPS technique introduces an advanced importance analysis enabled by Random Forest algorithms
FCM-based rainfall prediction approach where FCM, being gives insight into the most influencing factors of weather,
traditionally known to suppress preprocessing of weather which further leads to highly accurate and focused
data, has parameters upgraded by MBOA to ensure that
predictions.
maximum prediction potential is realized. This model was
tested on a batch of 25,919 samples and resulted in reaching This model trains very fast, and thus performs very rapidly
a maximum prediction accuracy of 94.22%. Hence, it on new data and gives in-time predictions. Something unique
outperformed any existing technique. It would act as a with this system is that it uses the Twilio API, which by itself
promising system for a real-time application of rainfall provides a tool to get real-time SMS notice. It automatically
forecasting in smart city environments. [11] sends an SMS alert to the registered user in case of the
predicted fall of rain. This way, instant response and
III. EXISTING SYSTEM preparation are possible. Most useful to agricultural users and
flooding-prone residents where faster access of rainfall
1. Statistical Models predictions may expect further damage on crops, manage
Overview: These models -ARIMA and STL- use historical resources, and aid early warning systems.
data trends and seasonality for forecasting rainfall. The model proposed in this article would offer a better high
Architecture: They represent mathematical formulas that prediction accuracy and the actionable alert mechanism for
capture patterns from time-series data. practical utility to communities and industries by offering
Advantages: Easy to use, interpretable and very efficient for timely information related to their state of weather conditions
simple linear trends. than the currently existing systems. Subsequent iterations
Disadvantages: Less effective in complex or nonlinear would be able to use data from IoT sensors in order to further
relationships, sensitive to missing values. increase their predictive accuracies by fully automated and
2. Machine Learning Models real-time acquisition of data for even timelier rainfall
Overview: Basically, the models used include Random predictions and alerts.
Forest, Support Vector Machines (SVM), and Gradient
Boosting Decision Trees (GBDT) relying on a set of weather
features to classify or forecast the probability of rainfall.
Architecture: The underlying pattern in multiple variables
becomes recognized through feature engineering, optimizing
the prediction using cross-validation and hyperparameter
tuning.
Advantages: High accuracy, interpretable feature
importance, and flexibility in handling nonlinear data.
Disadvantages: They require careful tuning, are sensitive to Fig 1.1 Machine Translation Flow Chart
noise, and might be costly to compute.
3. Deep Learning Models
Synopsis: Among the models employed in this class of data V. METHODOLOGY
are the Recurrent Neural Networks (RNN) and Convolutional
Neural Networks (CNN), which break complex relationships With this accuracy and usability incorporated into the
and temporal dependencies over the weather data. system, the rain prediction makes this process a real-time
Architecture: The RNN learns time-dependent patterns, alert machine learning in real time. Its model classifies the
whereas the CNN extracts spatial features from satellite or days as either rainy or not according to the processing done
radar images. A variation of RNN known as Long Short- on historical stream weather data with current or existing
Term Memory (LSTM) is highly effective in sequential data. data. This is how the system can interpret weather conditions
Advantages: High precision with complex datasets, flexible in a more complex manner, taking temperature, humidity, and
to the different sources of the data. atmospheric pressure as precursors to rainfall. Feature
High requirements: They require large datasets, high importance analysis enabled by Random Forest algorithms
computational resources, and can be tougher to interpret. gives insight into the most influencing factors of weather,
which further leads to highly accurate and focused
IV. PROPOSED SYSTEM predictions.
This model trains very fast, and thus performs very rapidly
The integration of the accuracy and usability proposed on new data and gives in-time predictions. The thing is, it
in the system makes the rainfall prediction a real-time alert uses the Twilio API, which, on its own, gives a tool that gets
machine learning in real time. Its model classifies the days as real-time SMS notice. The system automatically sends a
either rainy or not according to the processing it does on notice via SMS to the registered user in case of the predicted
fall of rain, hence an instant response and preparation attempt at gaining insight. With pop-up alerts, the
possible. Most useful to the agricultural users and the flood- negative effects may be minimized because all
prone residents where the faster access of rainfall predictions agricultural people, disaster management, and many
may expect further damage on crops, resource management, other sectors relying on weather can be notified in
and aid early warning systems. advance.
The model proposed in this paper would provide a better high This project clearly states the opportunities of the present
and future in machine learning and cloud-based
prediction accuracy and the actionable alert mechanism for
communication services for the enhancement of
practical utility to communities and industries by providing traditional means of weather prediction. Although the
timely information related to their state of weather conditions current versions are accurate enough, future editions can
than the currently existing systems. Subsequent iterations include more sources of data, such as IoT-enabled
would be able to use data from IoT sensors in order to further weather sensors, to make the system more accurate and
increase their predictive accuracies by fully automated and responsive. The enhanced rainfall prediction system shall
real-time acquisition of data for even timelier rainfall be available for communities and industries with
predictions and alerts. valuable tools easily accessible for real-time weather
intelligence, supporting proactive planning and
VI. RESULT resilience.

Hence, rainfall prediction represents the way in which VIII. REFERENCES


the offered prediction via historical weather data may be very
helpful for rainy and non-rainy days. This way, Random IEEE Citation: M. Mohammed, R. Kolapalli, N. Golla,
Forest Classifier executed an on-site demonstration and S. S. Maturi, "Prediction Of Rainfall Using
successfully to show that it was capable of generalizing Machine Learning Techniques," International Journal
reasonably with sufficient accuracy on the test set for unseen of Scientific & Technology Research, vol. 9, no. 1, pp.
data. Other performance metrics such as classification reports 3236–3240, Jan. 2020. [1]
and confusion matrices also show a highly balanced score on
the precision and recall parts of the model itself, avoiding any
IEEE Citation: M. Mohammed, R. Kolapalli, N. Golla,
issues regarding false positives and false negatives. This will
assuredly predict rain, which is very worthwhile to places and S. S. Maturi, "Prediction Of Rainfall Using
where fault in alerts could lead to exhaustion of resources or Machine Learning Techniques," International Journal
closure of opportunities for preemptive acts. of Scientific & Technology Research, vol. 9, no. 1, pp.
Apart from being accurate, it measures practical implications 3236–3240, Jan. 2020. [2]
through real-time alerting through the API contact of Twilio.
Alerts will be sent to users via text messages once there is an IEEE Citation: A. Parmar, K. Mistree, and M. Sompura,
immediate forecast of rain. This hands over the users enough "Machine Learning Techniques for Rainfall Prediction:
time to react to changing weather situations. The notification A Review," 2017 International Conference on
capability, one integrated with the power of machine Innovations in Information, Embedded and
learning, goes on to really and clearly illustrate this model's
Communication Systems (ICIIECS), 2017, pp. 1-8.. [3]
capability to fuse together predictive analytics with real-time
manifestations that permit the timely provision of
information in quite palatable ways. Future enhancements by IEEE Citation: E. Salcedo Aliaga, "Automatic System
the integration of real-time external weather sources will do for Rainfall Monitoring and Prediction with IoT and
the world of good concerning the improvement of accuracy Machine Learning," 2017 International Conference on
and permitting the system situational adaptability, thus Innovations in Information, 2017, pp. 1-10. [4]
emerging as invaluable assets towards personalized and
actionable weather forecasting. IEEE Citation: I. Suwarno et al., "IoT-based Lava Flood
Early Warning System with Rainfall Intensity
VII. CONCLUSION Monitoring and Disaster Communication Technology,"
Emerging Science Journal, vol. 4, Special Issue "IoT,
This proposed rainfall prediction system indicates a IoV, and Blockchain", pp. 154-164, 2021. [5]
good approach to predicting and alerting for the onset of
impending rainfall. The classifier uses a Random Forest
Classifier, which extensively develops the machine IEEE Citation: J. Soyemi and A. A. Bolaji, "A Web-
learning to understand the complex relationship with based Decision Support System with SMS-based
high accuracy between the main variables in the weather. Technology for Agricultural Information and Weather
Precise preprocessing and selection of relevant features Forecasting," International Journal of Computer
ensures the optimization of the model with focus on Applications, vol. 180, no. 16, pp. 1-6, Feb. 2018. [6]
critical influencing factors on rainfall, thus ensuring
reliability and robustness in various weather scenarios. IEEE Citation: C. Tensmeyer and T. Martinez,
Perhaps the most evident feature is the use of the Twilio "Analysis of Convolutional Neural Networks for
API to post real-time SMS updates. This should bridge Document Image Classification," arXiv preprint,
the gap between predictive data and practical application,
arXiv:1708.03273, 2017 [7]
ensuring that rain predictions don't become a mere
IEEE Citation: I. Suwarno, A. Ma’arif, N. M. Raharja,
A. Nurjanah, J. Ikhsan, and D. Mutiarin, "IoT-based
Lava Flood Early Warning System with Rainfall
Intensity Monitoring and Disaster Communication
Technology," Emerging Science Journal, vol. 4, Special
Issue "IoT, IoV, and Blockchain," pp. 154-164,
2021.[8]

IEEE Citation: Z. Zhao, Z. Wang, G. Zhao, and J. Zhao,


"A new strong convective precipitation forecasting
method based on attention mechanism and spatio-
temporal reasoning," Scientific Reports, vol. 14, no.
19024, pp. 1-16, 2024. [9]

IEEE Citation: D. Sivasundaralingam, K. Hansachapa,


S. Nimantha, S. Muthukumarana, N. Thasavaran, and
D. Herath, "Rainfall Prediction System," University of
Peradeniya, Sep. 2024. [10]

IEEE Citation: M. Al Duhayyim et al., "Modeling of


Fuzzy Cognitive Maps with a Metaheuristics-Based
Rainfall Prediction System," Sustainability, vol. 15, no.
1, p. 25, Dec. 2022, doi: 10.3390/su15010025. [11]

You might also like