"JAMASTIKA" Jurnal Mahasiswa Teknik Informatika
Vol. 5 No. 1 (2026): Volume 5 Nomor 1 April 2026

Penerapan Metode K-Nearest Neighbor (KNN) Untuk Klasifikasi Cuaca Hujan Berbasis Data Mining

Muhammad Marizal (Universitas Ibrahimy)
Zaehol Fatah (Universitas Ibrahimy)



Article Info

Publish Date
16 Apr 2026

Abstract

Perubahan iklim telah menyebabkan pola cuaca global menjadi semakin tidak teratur, sehingga mengharuskan adanya sistem peramalan yang mampu bekerja dengan cepat dan tepat. Riset ini bertujuan untuk mengklasifikasikan kondisi cuaca harian menggunakan algoritma K-Nearest Neighbor (KNN) berbasis business intelligence. Data yang dimanfaatkan dalam penelitian ini mencakup 13.201 sampel data cuaca dengan 11 atribut utama, yaitu suhu udara, kelembapan, kecepatan angin, curah hujan, tutupan awan, tekanan atmosfer, indeks ultraviolet, musim, jarak pandang, lokasi geografis, dan tipe cuaca sebagai label klasifikasi. Proses pengujian diterapkan dengan metode 10-Fold Cross Validation memanfaatkan perangkat lunak Altair AI Studio 2024.1.0. Hasil penelitian menunjukkan bahwa nilai parameter k berpengaruh signifikan terhadap performa model. Nilai k=7 menghasilkan akurasi tertinggi sebesar 89,28%, sedangkan nilai k=9 menunjukkan sedikit penurunan akurasi akibat efek over-smoothing. Analisis confusion matrix menunjukkan bahwa kelas Rainy dan Sunny memiliki tingkat klasifikasi tertinggi, sementara kesalahan terbesar terjadi antara Cloudy dan Sunny. Analisis bobot atribut menggunakan metode Weight by Information Gain menunjukkan bahwa temperature dan humidity memiliki pengaruh paling dominan terhadap hasil klasifikasi. Riset ini menegaskan bahwa algoritma KNN  digunakan sebagai metode efektif dalam sistem prediksi cuaca berbasis data mining dengan hasil yang akurat dan stabil Kata Kunci: Klasifikasi, K-Nearest Neighbor, Cuaca, Model Akurasi, Data Mining   Climate change has caused global weather patterns to become increasingly irregular, necessitating a forecasting system that can work quickly and accurately. This research aims to classify daily weather conditions using the K-Nearest Neighbor (KNN) algorithm based on business intelligence. The data utilized in this study includes 13,201 weather data samples with 11 main attributes, namely air temperature, humidity, wind speed, rainfall, cloud cover, atmospheric pressure, ultraviolet index, season, visibility, geographic location, and weather type as classification labels. The testing process was implemented using the 10-Fold Cross Validation method using Altair AI Studio 2024.1.0 software. The results showed that the value of the k parameter significantly influenced model performance. A value of k = 7 produced the highest accuracy of 89.28%, while a value of k = 9 showed a slight decrease in accuracy due to the over-smoothing effect. Confusion matrix analysis showed that the Rainy and Sunny classes had the highest classification rates, while the largest error occurred between Cloudy and Sunny. Attribute weight analysis using the Weight by Information Gain method showed that temperature and humidity had the most dominant influence on the classification results. This research confirms that the KNN algorithm is an effective method for data mining-based weather prediction systems, yielding accurate and consistent results.  Keywords: Classification, K-Nearest Neighbor, Weather, Accuracy Model, Data Mining  

Copyrights © 2026






Journal Info

Abbrev

jamastika

Publisher

Subject

Computer Science & IT

Description

Terbit dua kali setahun pada bulan April dan Oktober berisi tulisan ilmiah tentang mahasiswa teknik informatika, tulisan yang dimuat berupa hasil penelitian dari mahasiswa Teknik ...