PERBANDINGAN AKURASI ALGORITMA C4.5 DAN K-NEAREST NEIGHBORS UNTUK KLASIFIKASI CURAH HUJAN BERDASARKAN IKLIM INDONESIA - Nasrullah, Muhammad Fauzan; Saedudin, Rd. Rohmat; Hamami, Faqih (STKIP PGRI Tulungagung, 2024)
Indonesia has a dominant tropical climate, which is why it experiences limited temperature variations but diverse rainfall patterns. The variability of rainfall is closely intertwined with the impacts it exerts on various aspects of human life and business activities. Therefore, rainfall information constitutes a crucial aspect in decision-making. However, of course, there is a need for stages and methods to conduct the analysis process. Hence, this study aims to determine the superior method between C4.5 and K-Nearest Neighbors, both of which are algorithms in data mining, for classifying rainfall data. Both algorithms are employed to construct classification models based on relevant attributes. Subsequently, these models are tested and evaluated using various metrics such as Accuracy, Precision, Recall, and F1-Score. In this study, Hyperparameter Tuning is also applied using the RandomizedSearchCV method to obtain optimal parameters that can yield maximum accuracy. The research findings indicate that both algorithms perform well in rainfall classification. When considering the accuracy values obtained with the default parameters of both algorithms, C4.5 exhibits a higher accuracy rate of 81.42%, whereas K-Nearest Neighbors only achieves 78.10%. However, after utilizing the best parameters resulting from the implementation of Hyperparameter Tuning with RandomizedSearchCV, a significant accuracy improvement is observed in K-Nearest Neighbors, which reaches 83.37%. Meanwhile, C4.5's accuracy increases to 82.56%.