Rainfall prediction is an important component of weather analysis as it provides valuable information to support decision-making in sectors such as agriculture, transportation, and environmental management. Although various studies have compared machine learning algorithms for rainfall classification, many of them lack detailed discussion on dataset characteristics and practical system implementation. Therefore, this study aims to evaluate and compare the performance of Decision Tree and Naive Bayes algorithms for rainfall classification while considering dataset characteristics and implementing the model in a web-based application. The dataset used in this study consists of 2,500 records with meteorological parameters including temperature, humidity, wind speed, cloud cover, and atmospheric pressure. The data underwent preprocessing, including data cleaning and label encoding, where rainfall was represented as 1 and no rainfall as 0. The dataset was divided into training and testing sets, and both algorithms were applied to build classification models. Model performance was evaluated using confusion matrix, accuracy, and ROC curve analysis. The results show that the Decision Tree algorithm achieved an accuracy of 1.00 (100%), while the Naive Bayes algorithm achieved 0.972 (97.2%). Although Decision Tree shows superior performance, the perfect accuracy may indicate potential overfitting, and therefore the results should be interpreted carefully. Furthermore, the developed models were successfully implemented into a web-based application that enables users to perform rainfall prediction interactively. This study demonstrates that Decision Tree provides better performance for rainfall classification in the given dataset, while also highlighting the importance of considering dataset characteristics and evaluation methods. The integration of machine learning models into a web-based system provides a practical contribution for real-world weather prediction applications. Keywords: Rainfall Classification, Decision Tree, Naive Bayes, Machine Learning, Weather Dataset, Web-Based Application
Copyrights © 2026