Predicting Surabaya's Rainfall: A Comparative Study of Naïve Bayes, K-Nearest Neighbor, and Random Forest
Introduction:Accurate rainfall prediction plays a critical role in climate change adaptation, particularly in mitigating the risks of extreme droughts and floods. Reliable forecasts support sustainable water resource and agricultural management, contributing to reduced socio-economic vulnerability. This study aims to analyze rainfall conditions in Surabaya City and evaluate the performance of three classification methods to determine the most effective model for rainfall classification.Methods:This is a descriptive observational study using secondary data from the Meteorology, Climatology, and Geophysics Agency Maritime Station in Surabaya, covering the period from January 2019 to December 2023. The dataset consists of 1,822 daily weather observations, including rainfall, sunshine duration, temperature, wind speed, and humidity. After preprocessing, the rainfall variable was categorized into multiple classes. Three classification methods—Naïve Bayes, K-Nearest Neighbor, and Random Forest—were applied. Model performance was evaluated using accuracy, precision, recall, AUC-ROC, and loss function values.Results:All models achieved high accuracy, exceeding 0.93. Although Naïve Bayes showed slightly lower accuracy than the other two methods, it had the highest AUC-ROC and the lowest loss function value, indicating better class discrimination and generalization.Conclusions:The Naïve Bayes classifier is the most effective method for rainfall classification in Surabaya City. Among the predictor variables, sunshine duration is identified as the most influential factor in rainfall classification, followed by humidity, temperature, and wind speed
Authors
- Arip Ramadan
- Ratih Ardiati Ningrum (ORCID: https://orcid.org/0000-0002-2659-9328)
- Dwi Rantini (ORCID: https://orcid.org/0000-0002-5408-3038)
- Aziz Fajar (ORCID: https://orcid.org/0000-0002-1393-3470)
- Maryamah Maryamah (ORCID: https://orcid.org/0000-0001-9540-4427)
- Muhammad Noor Fakhruzzaman (ORCID: https://orcid.org/0000-0002-9981-0809)
- Alhassan Sesay
- Muhammad Axel Syahputra (ORCID: https://orcid.org/0000-0001-5027-7081)
- Mochammad Fahd Ali Hillaby
- Najma Attaqiya Alya
- Muhammad Mahdy Yandra
Institutions
- University of Surabaya (ID)
- University of Sierra Leone (SL)
- Universitas Airlangga (ID)
Publication Details
- Journal
- Data & Metadata
- Published
- 2025-06-12
- DOI
- https://doi.org/10.56294/dm20251075
- Citations
- 1
- Primary Topic
- Data Mining and Machine Learning Applications
- Type
- article
- Field-Weighted Citation Impact
- 3.25