Evaluating Machine Learning Models for Rainfall Occurrence Prediction in Smart Rainwater Harvesting
Evaluating Machine Learning Models for Rainfall Occurrence Prediction in Smart Rainwater Harvesting
Jenadel DL. Antipolo,John R. dela Cruz,2 Authors,Luigi Carlo M. De Jesus
Abstract
Rainwater harvesting is a potential solution to growing water scarcity, yet its operational efficiency depends on accurate rainfall prediction. Despite the fact that prior researches have studied machine learning (ML) for weather forecasting, few studies have systematically compared multiple classification models specifically aimed at supporting smart rainwater harvesting systems. This study evaluates the performance of six machine learning (ML) models to determine the most reliable model in predicting daily rainfall occurrence. The ML models include Support Vector Classifier (SVC), Logistic Regression, Random Forest, Gradient Boosting, K-Nearest Neighbors (KNN), and Gaussian Naïve Bayes in predicting daily rainfall occurrence using the meteorological data collected from PAGASA. A three-configuration experimental pipeline was implemented to ensure comprehensive model assessment. The first configuration evaluated baseline models using default-like parameters, while the second configuration applied an unbalanced optimized approach using GridSearchCV with 5-fold stratified cross-validation for systematic hyperparameter tuning. The third configuration utilized a SMOTE-balanced optimized setup, integrating synthetic minority oversampling within the cross-validation folds to assess whether class balancing improved predictive performance. Results show that the unbalanced optimized configuration provided the most reliable and stable performance, with SVC consistently achieving the highest test accuracy (0.751) and F1-score (0.748) across all setups. SMOTE balancing did not significantly improve outcomes due to the dataset's natural class balance. Threshold optimization increased training F1 but did not generalize to independent test data. Findings confirm SVC as the most suitable model for integration into a machine learning-based decision support system for smart rainwater harvesting applications.
