Submitted:
27 February 2024
Posted:
27 February 2024
Read the latest preprint version here
Abstract
Keywords:
1. Introduction
- To implement an ensemble-based predictive classifier to predict whether the rain will occur on a particular day.
- To implement an ensemble-based predictive regressor to predict the amount of rainfall and daily average temperature.
- To evaluate the performance of the ensemble-based models with the machine learning algorithms using evaluation metrics including accuracy, precision, recall and F1 score, along with the RMSE and MAE.
2. Related Work
3. Methodology
3.1. Subsection
3.2. Dataset
3.3. Evaluation Metrics
4. Data Analysis
4.1. Feature Distribution
4.2. EDA
4.2.1. Average Speed Analysis
4.2.2. Average Speed Analysis
4.2.3. Average Temperature Analysis
5. Implementation
5.1. Data Processing
5.1.1. Standardize the Variables
5.1.2. Transforming Categorical Variables
5.2. Rainfall Occurrence Prediction
5.3. Rainfall Amount Prediction
5.4. Daily Average Temperature Prediction
6. Results and Discussion
6.1. Rainfall Occurrence Prediction
6.1.1. Rainfall Prediction Comparison
6.2. Rainfall Amount Prediction
6.3. Daily Average Temperature Prediction
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- S. Badhiye, P. Chatur, and B. Wakode, "Temperature and humidity data analysis for future value prediction using clustering technique: an approach," International Journal of Emerging Technology and Advanced Engineering, vol. 2, no. 1, pp. 88-91, 2012.
- K. Pabreja, "Clustering technique to interpret Numerical Weather Prediction output products for forecast of Cloudburst," International Journal of Computer Science and Information Technologies (IJCSIT), vol. 3, no. 1, pp. 2996-2999, 2012.
- Parmar, K. Mistree, and M. Sompura, "Machine learning techniques for rainfall prediction: A review," in International conference on innovations in information embedded and communication systems, 2017, vol. 3.
- S. Kundu, S. K. Biswas, D. Tripathi, R. Karmakar, S. Majumdar, and S. Mandal, "A Review on Rainfall Forecasting using Ensemble Learning Techniques," e-Prime-Advances in Electrical Engineering, Electronics and Energy, p. 100296, 2023. [CrossRef]
- M. E. Mann and P. H. Gleick, "Climate change and California drought in the 21st century," Proceedings of the National Academy of Sciences, vol. 112, no. 13, pp. 3858-3859, 2015. [CrossRef]
- 6. C. C. Stephan, N. P. Klingaman, P. L. Vidale, A. G. Turner, M.-E. Demory, and L. Guo, "A comprehensive analysis of coherent rainfall patterns in China and potential drivers. Part I: Interannual variability," Climate Dynamics, vol. 50, pp. 4405-4424, 2018. [CrossRef]
- N. A. B. Klutse, B. J. Abiodun, B. C. Hewitson, W. J. Gutowski, and M. A. Tadross, "Evaluation of two GCMs in simulating rainfall inter-annual variability over Southern Africa," Theoretical and applied climatology, vol. 123, pp. 415-436, 2016. [CrossRef]
- K. Sittichok, A. G. Djibo, O. Seidou, H. M. Saley, H. Karambiri, and J. Paturel, "Statistical seasonal rainfall and streamflow forecasting for the Sirba watershed, West Africa, using sea-surface temperatures," Hydrological Sciences Journal, vol. 61, no. 5, pp. 805-815, 2016. [CrossRef]
- J. Wu, J. Long, and M. Liu, "Evolving RBF neural networks for rainfall prediction using hybrid particle swarm optimization and genetic algorithm," Neurocomputing, vol. 148, pp. 136-142, 2015. [CrossRef]
- N. Singh, S. Chaturvedi, and S. Akhter, "Weather forecasting using machine learning algorithm," in 2019 International Conference on Signal Processing and Communication (ICSC), 2019: IEEE, pp. 171-174. [CrossRef]
- S. Cramer, M. Kampouridis, A. A. Freitas, and A. K. Alexandridis, "An extensive evaluation of seven machine learning methods for rainfall prediction in weather derivatives," Expert Systems with Applications, vol. 85, pp. 169-181, 2017. [CrossRef]
- N. Srinu and B. H. Bindu, "A Review on Machine Learning and Deep Learning based Rainfall Prediction Methods," in 2022 International Conference on Power, Energy, Control and Transmission Systems (ICPECTS), 2022: IEEE, pp. 1-4. [CrossRef]
- E. Dritsas, M. Trigka, and P. Mylonas, "A Multi-class Classification Approach for Weather Forecasting with Machine Learning Techniques," in 2022 17th International Workshop on Semantic and Social Media Adaptation & Personalization (SMAP), 2022: IEEE, pp. 1-5. [CrossRef]
- S. Choi and E.-S. Jung, "Optimizing Numerical Weather Prediction Model Performance using Machine Learning Techniques," IEEE Access, 2023. [CrossRef]
- S. Nigam, M. Gupta, A. Shrinivasan, A. V. S. Uttej, C. Kumari, and P. Disha, "Comparative Study to determine Accuracy for Weather Prediction using Machine Learning," in 2023 International Conference on Computer Communication and Informatics (ICCCI), 2023: IEEE, pp. 1-4. [CrossRef]
- M. A. Rahman, L. Yunsheng, and N. Sultana, "Analysis and prediction of rainfall trends over Bangladesh using Mann–Kendall, Spearman’s rho tests and ARIMA model," Meteorology and Atmospheric Physics, vol. 129, no. 4, pp. 409-424, 2017. [CrossRef]
- Mahabub and A. Habib, "An overview of weather forecasting for Bangladesh using machine learning techniques," Machine Learning, pp. 1-36, 2019.
- H. Shaiba et al., "Weather Forecasting Prediction Using Ensemble Machine Learning for Big Data Applications," Computers, Materials & Continua, vol. 73, no. 2, 2022. [CrossRef]
- H. Bosu, T. Rashid, A. Mannan, and J. Meandad, "Trends of Rainfall and Temperature in Bangladesh: A Comparative Analysis of CMIP5 Results and Meteorological Station Data," The Dhaka University Journal of Earth and Environmental Sciences, vol. 9, no. 2, pp. 9-18, 2020. [CrossRef]
- F. Hashim, N. N. Daud, K. Ahmad, J. Adnan, and Z. Rizman, "Prediction of rainfall based on weather parameter using artificial neural network," Journal of Fundamental and Applied Sciences, vol. 9, no. 3S, pp. 493-502, 2017. [CrossRef]
- J. Dong, W. Zeng, L. Wu, J. Huang, T. Gaiser, and A. K. Srivastava, "Enhancing short-term forecasting of daily precipitation using numerical weather prediction bias correcting with XGBoost in different regions of China," Engineering Applications of Artificial Intelligence, vol. 117, p. 105579, 2023. [CrossRef]
- S. Paul and S. Roy, "Forecasting the Average Temperature Rise in Bangladesh: A Time Series Analysis," Journal of Engineering Science, vol. 11, no. 1, pp. 83-91, 2020.
- J. Sulaiman and S. H. Wahab, "Heavy rainfall forecasting model using artificial neural network for flood prone area," in IT Convergence and Security 2017: Volume 1, 2018: Springer, pp. 68-76. [CrossRef]
- B. T. Pham, D. Tien Bui, M. Dholakia, I. Prakash, and H. V. Pham, "A comparative study of least square support vector machines and multiclass alternating decision trees for spatial prediction of rainfall-induced landslides in a tropical cyclones area," Geotechnical and Geological Engineering, vol. 34, pp. 1807-1824, 2016. [CrossRef]
- M. Kim, Y. Kim, H. Kim, W. Piao, and C. Kim, "Evaluation of the k-nearest neighbor method for forecasting the influent characteristics of wastewater treatment plant," Frontiers of Environmental Science & Engineering, vol. 10, pp. 299-310, 2016. [CrossRef]
- S. Zainudin, D. S. Jasim, and A. A. Bakar, "Comparative analysis of data mining techniques for Malaysian rainfall prediction," Int. J. Adv. Sci. Eng. Inf. Technol, vol. 6, no. 6, pp. 1148-1153, 2016.
- Sagi and L. Rokach, "Ensemble learning: A survey," Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 8, no. 4, p. e1249, 2018. [CrossRef]
- N. S. Sani, A. H. Abd Rahman, A. Adam, I. Shlash, and M. Aliff, "Ensemble learning for rainfall prediction," International Journal of Advanced Computer Science and Applications, vol. 11, no. 11, 2020.
- Y. Ren, L. Zhang, and P. N. Suganthan, "Ensemble classification and regression-recent developments, applications and future directions," IEEE Computational intelligence magazine, vol. 11, no. 1, pp. 41-53, 2016. [CrossRef]
- G. Kunapuli, Ensemble Methods for Machine Learning. Simon and Schuster, 2023.
- "Weather Data Bangladesh." Kaggle. https://www.kaggle.com/datasets/apurboshahidshawon/weatherdatabangladesh (accessed 20 September, 2023).













| Refs | Models | Prediction | Limitation |
|---|---|---|---|
| [11] | Genetic Programming, Support Vector Regressor (SVR), M5 rules, M5 Model Trees, Radial Basis Neural Network | Rainfall Amount | Using traditional machine learning techniques |
| [17] | SVR, Linear Regression, Ridge Regression, Bayesian Ridge, Gradient Boosting, XGBoost, CatBoost, AdaBoost, KNN, Decision Tree | Windspeed, Humidity, Temperature and Rainfall amount | -Rainfall occurrence prediction is not implemented -Regression based algorithms are used only |
| [20] | Multi-layer Perceptron (MLP) | Raindrop prediction using temperature, pressure and humidity | -using single model only -rainfall occurrence and temperature prediction not implemented |
| [21] | XGBoost Model | Rainfall Amount Prediction | -Rainfall occurrence prediction is not implemented |
| [22] | Linear Regression, Polynomial Regression, and SVR | Daily Min, Max and average temperature prediction | -Rainfall occurrence and Rainfall amount prediction is not implemented -Traditional Techniques |
| [23] | Artificial Nerual Network (ANN) | Rainfall Amount Prediction | -Rainfall occurrence prediction is not implemented |
| [24] | Least Square Support Vector Machine (LSSVM) and Multi-class Alternating Decision Tree (MADT) | Rainfall Prediction | -only rainfall prediction -using 1 year dataset only |
| [26] | Naïve Bayes, Decision Tree, Random Forest | Rainfall Prediction | Small training dataset, 10 and 30% only |
| [28] | Ensemble based model using Random Forest, SVM, NN, NB, C4.5) | Rainfall Prediction | Low Accuracy |
| Month | WindSpeed9am | WindSpeed3pm |
|---|---|---|
| 01 | 15.285171 | 17.403042 |
| 02 | 15.468504 | 18.228346 |
| 03 | 15.989247 | 18.053763 |
| 04 | 16.466667 | 19.396296 |
| 05 | 16.580645 | 18.419355 |
| 06 | 15.077778 | 18.807407 |
| 07 | 14.612903 | 20.229391 |
| 08 | 13.645161 | 20.114695 |
| 09 | 13.818519 | 21.203704 |
| 10 | 13.896057 | 21.007168 |
| 11 | 14.922222 | 19.407407 |
| 12 | 15.207885 | 19.111111 |
| Month | Humidity9am | Humidity3pm |
|---|---|---|
| 01 | 73.574144 | 57.136882 |
| 02 | 72.830709 | 56.468504 |
| 03 | 68.519713 | 52.698925 |
| 04 | 67.285185 | 52.374074 |
| 05 | 64.014337 | 49.906810 |
| 06 | 66.433333 | 54.000000 |
| 07 | 65.179211 | 52.333333 |
| 08 | 64.164875 | 52.867384 |
| 09 | 65.844444 | 56.100000 |
| 10 | 71.197133 | 59.139785 |
| 11 | 70.500000 | 58.514815 |
| 12 | 70.007168 | 55.211470 |
| Month | MinTemp | MaxTemp | Temp9am | Temp3pm |
|---|---|---|---|---|
| 01 | 14.851331 | 22.621673 | 17.158555 | 21.422814 |
| 02 | 14.154331 | 21.984252 | 16.439764 | 20.783858 |
| 03 | 12.713620 | 21.339068 | 15.451971 | 20.127599 |
| 04 | 12.600000 | 21.145926 | 15.721111 | 19.736667 |
| 05 | 12.651971 | 21.878495 | 15.939785 | 20.335125 |
| 06 | 13.621852 | 22.000741 | 16.786296 | 20.429259 |
| 07 | 14.223297 | 22.521505 | 17.465591 | 20.882437 |
| 08 | 15.870251 | 24.025090 | 19.237276 | 22.390323 |
| 09 | 17.608148 | 25.315926 | 21.029630 | 23.648889 |
| 10 | 17.709319 | 24.853047 | 20.483154 | 23.400000 |
| 11 | 16.749630 | 24.394074 | 19.634815 | 22.865185 |
| 12 | 15.739785 | 23.900358 | 18.408602 | 22.443011 |
| Models | Accuracy | Precision | Recall | F1 score |
|---|---|---|---|---|
| Logistic Regression | 0.823581 | 0.548173 | 0.714286 | 0.620301 |
| KNN | 0.800000 | 0.368771 | 0.740000 | 0.825270 |
| Decision Tree | 0.774672 | 0.594684 | 0.568254 | 0.581169 |
| SVC | 0.828821 | 0.528239 | 0.746479 | 0.618677 |
| Random Forest | 0.829694 | 0.511628 | 0.762376 | 0.612326 |
| Ensemble Classifier | 0.834061 | 0.511628 | 0.781726 | 0.618474 |
| Models | Accuracy | Precision | Recall | F1 Score |
|---|---|---|---|---|
| Combination of (SVM, ANN, NB, C4.5, RF)[28] | 75% | 53% | 73% | 61% |
| Ours | 83% | 51% | 78% | 61% |
| Algorithms | MAE | RMSE |
|---|---|---|
| Linear Regression | 0.498774 | 0.948272 |
| Random Forest | 0.378243 | 0.882860 |
| SVR | 0.365070 | 0.971967 |
| Ensemble Regression | 0.363691 | 0.904688 |
| Algorithms | MAE | RMSE |
|---|---|---|
| Linear Regression | 0.470631 | 0.603241 |
| Random Forest | 0.450968 | 0.570240 |
| SVR | 0.434701 | 0.560317 |
| Ensemble Regression | 0.425209 | 0.545714 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).