COMPARISON OF DECISION TREE AND NAIVE BAYES METHODS FOR RAINFALL CLASSIFICATION USING A WEATHER DATASET WITH A WEB-BASED APPLICATION
DOI:
https://doi.org/10.30656/fxnw2631Abstract
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
References
[1] G. DE COLOMBIA, “SMART CITIES,” RESEARCHGATE, PP. 1–51, 2017.
[2] M. LIYEW AND G. MELESE, “MACHINE LEARNING APPROACHES FOR RAINFALL PREDICTION: A REVIEW,” INTERNATIONAL JOURNAL OF CLIMATOLOGY, VOL. 36, NO. 3, PP. 255–272, 2021.
[3] K. R. B AND G. A, “RAINFALL PREDICTION USING DATA MINING TECHNIQUES: A SURVEY,” VOL. 83, NO. 8, PP. 23–30, 2013.
[4] Y. FINDAWATI, I. R. I. ASTUTIK, A. S. FITRONI, I. INDRAWATI, AND N. YUNIASIH, “COMPARATIVE ANALYSIS OF NAÏVE BAYES, K-NEAREST NEIGHBOR, AND C4.5 METHODS IN WEATHER FORECASTING,” JOURNAL OF PHYSICS: CONFERENCE SERIES, VOL. 1402, NO. 6, PP. 1–6, 2019.
[5] V. KUMAR, N. KEDAM, O. KISI, S. ALSULAMY, K. M. KHEDHER, AND M. A. SALEM, “A COMPARATIVE STUDY OF MACHINE LEARNING MODELS FOR DAILY AND WEEKLY RAINFALL FORECASTING,” WATER RESOURCES MANAGEMENT, VOL. 39, NO. 1, PP. 271–290, 2025.
[6] A. NOEMAN, D. HANDAYANI, AND A. HISWARA, “DECISION TREE-BASED WEATHER PREDICTION,” VOL. 10, NO. 225, PP. 67–78, 2026.
[7] M. W. MARTADIANSYAH, A. GHUFRON, R. A. HIDAYAH, D. SALZABILA, AND L. AMANDA, “COMPARISON OF C4.5 ALGORITHM AND NAIVE BAYES FOR RAINFALL CLASSIFICATION,” JURNAL KOMPUTER DAN ANTARMUKA, VOL. 3, NO. 1, PP. 8–17, 2025.
[8] M. A. SULARSO AND J. JUPRON, “THE EFFECT OF DATA IMBALANCE ON THE PERFORMANCE OF THE NAIVE BAYES ALGORITHM IN STROKE CLASSIFICATION,” INFOTECH JOURNAL OF INFORMATION TECHNOLOGY, VOL. 6, NO. 2, PP. 212–218, 2025.
[9] I. ENGINEERING ET AL., “FLOOD DISASTER CLASSIFICATION ANALYSIS BASED ON …,” VOL. 5, NO. 2, PP. 109–117, 2021.
[10] N. A. PRAKOSO INDARYONO, “COMPARATIVE ANALYSIS OF RANDOM FOREST AND NAÏVE BAYES ALGORITHMS FOR RAINFALL CLASSIFICATION BASED ON CLIMATE IN INDONESIA,” JIPI (JOURNAL OF INFORMATICS RESEARCH AND LEARNING), VOL. 9, NO. 1, PP. 158–167, 2024.
[11] M. KOLAM AND D. NOTIFIKASI, “JURNAL RESTI,” RESTI, VOL. 1, NO. 10, PP. 19–25, 2021.
[12] R. IRMANITA, S. S. PRASETIYOWATI, AND Y. SIBARONI, “CLASSIFICATION OF MALARIA COMPLICATION USING CART (CLASSIFICATION AND REGRESSION TREE) AND NAÏVE BAYES,” JURNAL RESTI, VOL. 5, NO. 1, PP. 10–16, 2021.
[13] H. OKTAVIANTO, H. W. SULISTYO, G. WIJAYA, D. IRAWAN, AND G. ABDURRAHMAN, “COMPARATIVE ANALYSIS OF DECISION TREE AND RANDOM FOREST IN HEALTH TEXT DATA CLASSIFICATION,” BINA INSANI ICT JOURNAL, VOL. 11, NO. 1, P. 56, 2024.
[14] A. HURA, “APPLICATION OF MACHINE LEARNING FOR AGRICULTURAL PRODUCTIVITY PREDICTION BASED ON WEATHER DATA IN INDONESIA,” JIARTIN JOURNAL OF ARTIFICIAL INTELLIGENCE NUSANTARA, VOL. 1, NO. 1, PP. 1–8, 2025.
[15] A. S. AGUNG, A. A. FAUZI, A. A. NUR RISAL, AND F. ADIBA, “IMPLEMENTATION OF DATA MINING TECHNIQUES FOR RAINFALL PREDICTION CLASSIFICATION USING BMKG DATA IN SOUTH SULAWESI,” JURNAL TEKNO INSENTIF, VOL. 17, NO. 1, PP. 22–23, 2023.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Yuda Samudra, Amin Hidayat, Nanang

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
-
Author(s)' Warranties
The author warrants that the article is original, written by stated author(s), has not been published before, contains no unlawful statements, does not infringe the rights of others, is subject to copyright that is vested exclusively in the author and free of any third party rights, and that any necessary written permissions to quote from other sources have been obtained by the author(s).
- Information
- Notice about change in the copyright policy of the journal 'Jurnal Sistem Informasi (JSiI)' : "From Vol 1, onwards the copyright of the article published in the journal 'Jurnal Sistem Informasi' will be retained by the author"


















