Analysis of KNN and Decision Tree for Rainfall Prediction in South Tangerang

Authors

  • Jupron Jupron Author

Keywords:

Prediction, Rainfall, Data Mining, KNN, C4.5

Abstract

The phenomenon of variable rainfall and extreme rain with high intensity occurring within a short period frequently takes place in South Tangerang City and disrupts community activities. The uncertainty of daily rainfall patterns poses a serious challenge in disaster mitigation and regional planning. This condition requires a scientific approach based on historical data capable of accurately identifying weather patterns. However, comparative research between two data mining algorithms, namely K-Nearest Neighbor and Decision Tree C4.5, for rainfall prediction in South Tangerang City is still limited, thus a more in-depth analysis of their performance is necessary. This study aims to analyze and compare the performance of K-Nearest Neighbor and Decision Tree C4.5 in rainfall prediction using weather classification categories in South Tangerang City. The data were obtained from BMKG for the period 2022–2024 and processed using RapidMiner software through several stages, including preprocessing, data cleaning, normalization, data splitting, model evaluation, and testing using 5-fold and 10-fold cross-validation. The evaluation metrics used were accuracy, recall, precision, F1-score, and kappa.The expected outcome of this study is to obtain a classification algorithm capable of predicting rainfall accurately and consistently based on historical weather patterns. Based on the testing results, Decision Tree C4.5 demonstrates a higher accuracy level compared to K-Nearest Neighbor, thus it can serve as a scientific foundation for the South Tangerang City Government for further development.

References

Agung, A. S., Fauzi, A. A., Nur Risal, A. A., & Adiba, F. (2023). Implementasi Teknik Data Mining terhadap Klasifikasi Data Prediksi Curah Hujan BMKG Di Sulawesi Selatan. Jurnal Tekno Insentif, 17(1), 22–23. https://doi.org/10.36787/jti.v17i1.955

Al Arif, A., Firdaus, M., Rahmaddeni, & Maruhawa, Y. (2022). Perbandingan Metode Data Mining untuk Prediksi Curah Hujan dengan Algoritma C4.5, Naïve Bayes, dan KNN. SENTIMAS: Seminar Nasional Penelitian Dan Pengabdian Masyarakat, 187–197.

Ananda, N., & Gaol, G. . M. L. (2024). Estimasi Curah Hujan Bulanan Menggunakan Multi Layer Perceptron di Kota Tangerang Selatan. Buletin Meteorologi,Klimatologi, dan Geofisika, 5(4), 17–26.

Badan Pusat Statistik. (2025). Statistik Daerah Kota Tangerang Selatan 2025. BPS Kota Tangerang Selatan, 1–22.

Fatikah, I. H., & Khazizah, N. (2022). Analisis cuaca di Kota Jakarta bulan Januari tahun 2018 menggunakan Algoritma Decision Tree. Jurnal Poros Teknik, 14(1), 33–37. https://www.kaggle.com/datasets/msf1203/pr

Fatmawati. (2016). Perbandingan Algoritma Klasifikasi Data Mining Model C4.5 Dan Naive Bayes Untuk Prediksi Penyakit Diabetes. Jurnal Techno Nusa Mandiri, XIII(1), 50.

Limahelu, E. L., Thenu, Y. M., Umar, N., Putri, A. P. S., P.A.B, M. S., Antariksa, A. J., & Hakim, L. (2020). Buletin Meteorologi Analisis Cuaca Bulan Juni 2020. Buletin Meteorologi Stasiun Meteorologi Umbu Mehang Kunda Sumba Timur, 1–20.

Miller, C., Portlock, T., Nyaga, D. M., & O’Sullivan, J. M. (2024). A review of model evaluation metrics for machine learning in genetics and genomics. Frontiers in Bioinformatics, 4, 1–13. https://doi.org/10.3389/fbinf.2024.1457619

Pertiwi, D. A. S., & Paski, J. A. I. (2022). Analisis Dinamika Atmosfer Kejadian Hujan Ekstrim ( Studi Kasus Banjir di Tangerang, Buletin Meteorologi, Klimatologi, Dan Geofisika, 2(2), 1–10.

Supriatna, D., & Uliyatunisa. (2025). Komparasi Model LSTM dan CNN-LSTM untuk Peramalan Curah Hujan di Kota Tangerang Selatan. Buletin Of Information Technology, 6(3), 294–301. https://doi.org/10.47065/bit.v5i2.2235

Susilawati Sugiana, N. S., & Musty, B. (2023). Analisis Data Sistem Informasi Monitoring Marketing; Tools Pengambilan Keputusan Strategic. Jutisi : Jurnal Ilmiah Teknik Informatika Dan Sistem Informasi, 12(2), 696. https://doi.org/10.35889/jutisi.v12i2.1240

Zidane, M. Y., Nurina Sari, B., Maulana, I., Primaya, A., & Garno, G. (2024). Penerapan Data Mining Dalam Klasifikasi Data Transaksi Produk Koperasi Di Smk Pgri 2 Karawang. JATI (Jurnal Mahasiswa Teknik Informatika), 9(1), 263–269. https://doi.org/10.36040/jati.v9i1.12196

Downloads

Published

2026-04-04