Volume 8 • Issue 1 • PP: 42–48 • 2024
Weather Prediction: Predicting Rain Using Weather Conditions
Open Access & Copyright
© 2024 The Author(s). Published by ASPG. This article is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Abstract
Weather forecasting is a major discipline that plays an important role in fields such as agriculture, transport, and emergency management, and it largely depends on accurate forecasts. Concerning this problem, this work aimed to analyze the effectiveness of recurrent neural networks, particularly the Long Short-Term Memory (LSTM), for estimating rainfall depending on precipitation, maximum temperature, minimum temperature, and wind speed. We will therefore use a large database containing recorded weather data obtained over several years to calibrate accurate predictive models designed to distinguish between drizzle, rain, sun, snow, and fog. The main idea of the work is to teach LSTM models that are capable of revealing temporal relations and patterns in sequential data, which makes them suitable for time-series forecasting such as weather prediction. The data is preprocessed effectively to clean it and make it suitable for analysis. To accurately compare the performance of one model against the others, we have divided the data into training, validation, and testing sets. The performance of the proposed LSTM model is evaluated with the Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and the coefficient of determination (R2) to measure forecasting accuracy. The findings show improved predictive performance: the best-performing LSTM model has an MSE of 8.74, RMSE of 2.96, MAE of 2.35, and R2 of 0.83. These metrics indicate a relationship between the predicted and actual weather conditions, demonstrating the model’s efficiency. The evaluation also shows how hyperparameter optimization, feature selection, and normalization affect model performance and how precise management of weather parameters can result in better forecasts. This research has practical as well as theoretical value because it can improve the dependability of weather forecasts. More precise weather data can benefit crop growing, road networks, transportation systems, and emergency and rescue operations preparing for adverse conditions and disasters. Consequently, this study contributes to research on weather patterns and unexpected rainfall by demonstrating the potential of LSTM networks to analyze key meteorological characteristics for rainfall prediction. Possible future directions include expanding the feature set, using continuous rather than weekly data, and considering a mixed-input approach to increase prediction accuracy. This strategy seeks to improve meteorological forecasting and timely resource allocation and management under climate volatility.
Keywords
References
[1] J. A. Segovia, J. F. Toaquiza, J. R. Llanos, and D. R. Ri-vas, “Meteorological variables forecasting system using machine learning and open-source software,” Electron-ics, vol. 12, no. 4, p. 1007, 2023.
[2] P. Aghelpour, B. Mohammadi, and S. M. Biazar, “Long-term monthly average temperature forecasting in some climate types of iran, using the models SARIMA, SVR, and SVR-FA,” Theoretical and Applied Climatology, vol. 138, no. 3, pp. 1471–1480, 2019.
[3] R. Llugsi, S. E. Yacoubi, A. Fontaine, and P. Lupera, “Comparison between Adam, AdaMax and AdamW opti-mizers to implement a weather forecast based on neural networks for the andean city of quito,” in 2021 IEEE Fifth Ecuador Technical Chapters Meeting (ETCM), 2021, pp. 1–6.
[4] E. Alshdaifat, D. Alshdaifat, A. Alsarhan, F. Hussein, and S. M. F. S. El-Salhi, “The effect of preprocessing techniques, applied to numeric features, on classifica-tion algorithms’ performance,” Data, vol. 6, no. 2, p. 2, 2021.
[5] M. A. R. Suleman and S. Shridevi, “Short-term weather forecasting using spatial feature attention based LSTM model,” IEEE Access, vol. 10, pp. 82 456–82 468, 2022.
[6] D. Kreuzer, M. Munz, and S. Schlüter, “Short-term temperature forecasts using a convolutional neural network—an application to different weather stations in germany,” Machine Learning with Applications, vol. 2, p. 100007, 2020.
[7] A. Parasyris, G. Alexandrakis, G. V. Kozyrakis, K. Spanoudaki, and N. A. Kampanis, “Predicting meteo-rological variables on local level with SARIMA, LSTM and hybrid techniques,” Atmosphere, vol. 13, no. 6, p. 878, 2022.
[8] R. Zafar, B. H. Vu, M. Husein, and I.-Y. Chung, “Day-ahead solar irradiance forecasting using hybrid recurrent neural network with weather classification for power system scheduling,” Applied Sciences, vol. 11, no. 15, p. 6738, 2021.
[9] P. Hewage, M. Trovati, E. Pereira, and A. Behera, “Deep learning-based effective fine-grained weather forecast-ing model,” Pattern Analysis and Applications, vol. 24, no. 1, pp. 343–366, 2021.
[10] S. Khullar and N. Singh, “Water quality assessment of a river using deep learning Bi-LSTM methodology: Forecasting and validation,” Environmental Science and Pollution Research, vol. 29, no. 9, pp. 12 875–12 889, 2022.
[11] H. Elfaik and E. H. Nfaoui, “Deep bidirectional LSTM network learning-based sentiment analysis for arabic text,” Journal of Intelligent Systems, vol. 30, no. 1, pp. 395–412, 2021.
[12] Y. Yu, X. Si, C. Hu, and J. Zhang, “A review of recurrent neural networks: LSTM cells and network architectures,” Neural Computation, vol. 31, no. 7, pp. 1235–1270, 2019.
[13] D. K. Roy, T. K. Sarkar, S. S. A. Kamar, T. Goswami, M. A. Muktadir, H. M. Al-Ghobari, A. Alataway, A. Z. Dewidar, A. A. El-Shafei, and M. A. Mattar, “Daily pre-diction and multi-step forward forecasting of reference evapotranspiration using LSTM and Bi-LSTM models,” Agronomy, vol. 12, no. 3, p. 594, 2022.
[14] A. Anshuka, R. Chandra, A. J. V. Buzacott, D. Sander-son, and F. F. van Ogtrop, “Spatiotemporal hydrological extreme forecasting framework using LSTM deep learn-ing model,” Stochastic Environmental Research and Risk Assessment, vol. 36, no. 10, pp. 3467–3485, 2022.
[15] C. Yaiprasert and A. N. Hidayanto, “Ai-driven ensem-ble three machine learning to enhance digital marketing strategies in the food delivery business,” Intelligent Sys-tems with Applications, vol. 18, p. 200235, 2023.
Cite This Article
Choose your preferred format
Publisher's Note
The statements, opinions, and data presented in this article are solely those of the author(s) and do not necessarily represent those of ASPG, the journal, or its editors. ASPG and the editors disclaim responsibility for any harm arising from the use of any ideas, methods, instructions, or products described in this article, to the fullest extent permitted by applicable law.