This study aims to compare the performance of Random Forest and K-Nearest Neighbors (KNN) algorithms in classifying daily weather categories at Kemayoran Meteorological Station, Jakarta. The data used were BMKG observation data from 2017 to 2023, with classification targets consisting of No Significant Weather, RA, TS, and TS,RA. The variables included temperature, rainfall, air pressure, humidity, wind speed, sunshine duration, wind direction, and month. The data were preprocessed and divided into training and testing sets using an 80:20 ratio. The results showed that Random Forest achieved an accuracy of 78% with a weighted average F1-score of 0.75, while KNN achieved an accuracy of 65% with a weighted average F1-score of 0.59. Random Forest performed better in classifying dominant weather categories, although both algorithms still had limitations in identifying minority categories, particularly TS. These findings indicate that Random Forest is more suitable for daily weather classification based on BMKG observation data in urban areas. Keywords: K-Nearest Neighbors; Random Forest; Weather Classification
Copyrights © 2026