IDEAS home Printed from https://ideas.repec.org/a/dbk/datame/v4y2025ip1075id1056294dm20251075.html
   My bibliography  Save this article

Predicting Surabaya's Rainfall: A Comparative Study of Naïve Bayes, K-Nearest Neighbor, and Random Forest

Author

Listed:
  • Arip Ramadan
  • Muhammad Axel Syahputra
  • Dwi Rantini
  • Ratih Ardiati Ningrum
  • Muhammad Noor Fakhruzzaman
  • Aziz Fajar
  • Maryamah
  • Muhammad Mahdy Yandra
  • Najma Attaqiya Alya
  • Mochammad Fahd Ali Hillaby
  • Alhassan Sesay

Abstract

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

Suggested Citation

Handle: RePEc:dbk:datame:v:4:y:2025:i::p:1075:id:1056294dm20251075
DOI: 10.56294/dm20251075
as

Download full text from publisher

To our knowledge, this item is not available for download. To find whether it is available, there are three options:
1. Check below whether another version of this item is available online.
2. Check on the provider's web page whether it is in fact available.
3. Perform a
for a similarly titled item that would be available.

More about this item

Statistics

Access and download statistics

Corrections

All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:dbk:datame:v:4:y:2025:i::p:1075:id:1056294dm20251075. See general information about how to correct material in RePEc.

If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

We have no bibliographic references for this item. You can help adding them by using this form .

If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Javier Gonzalez-Argote (email available below). General contact details of provider: https://dm.ageditor.ar/ .

Please note that corrections may take a couple of weeks to filter through the various RePEc services.

IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.