COMPARISON ACCURACY OF C4.5 ALGORITHM AND K-NEAREST NEIGHBORS FOR RAINFALL CLASSIFICATION - Muhammad Fauzan Nasrullah; RD. Rohmat Saedudin; Faqih Hamami (RAM PUBLISHER, 2024)
Indonesia has a predominantly tropical climate, hence Indonesia experiences limited temperature variations, but has diverse rainfall variations. The variability of rainfall is also inseparable from the impact it has on various aspects of human life and business activities. Therefore, rainfall information is an important aspect in decision making. However, of course, there are stages and methods needed to carry out the analysis process. Therefore, this study looked for the best method between C4.5 and K-Nearest Neighbors which included algorithms in data mining to classify rainfall data. Both algorithms are used to build classification models based on relevant attribute attributes. Then, testing and evaluating both models using various metrics such as Accuracy, Precision, Recall and F1-Score were carried out. In this study also applied Hyperparameter Tuning with the RandomizeSearchCV method to get the best parameters to get maximum accuracy values. The results showed good accuracy values for both algorithms, in the sense that both algorithms were able to classify rainfall based on Indonesia's climate well. Based on the accuracy values obtained with the default parameters of both algorithms, C4.5 produces a higher accuracy value of 81.42%, while K-Nearest Neighbors is only 78.10%. However, after using the best parameters resulting from the application of RandomizedSearchCV Hyperparameter Tuning, a significant change in accuracy value occurred in K-Nearest Neighbors which was found to be 83.37%, while C4.5 increased to 82.56%.