Poverty is a major issue in sustainable development in Indonesia that requires a data-driven analysis approach to produce more accurate identification. This study aims to compare the performance of the K-Nearest Neighbor (K-NN) and Naive Bayes algorithms in classifying poverty levels in Indonesia based on social and economic data. The dataset was obtained from the Kaggle platform with the title "Classification of Poverty Levels in Indonesia", which contains 514 district/city data with various poverty indicators. The data was divided with a ratio of 80% for training and 20% for testing, then classification was carried out using the K-NN algorithm with a value of K = 5 and Naive Bayes. Evaluation was carried out using a confusion matrix with metrics of accuracy, precision, recall, and F1-score. The results showed that K-NN provided the best results with an accuracy of 97.09%, precision of 100%, recall of 75.00%, and F1-score of 85.71%, while Naive Bayes achieved an accuracy of 95.15%, precision of 73.33%, recall of 91.67%, and F1-score of 81.48%. This study resulted in better performance of this model compared to the results of previous studies. Therefore, the K-NN algorithm with the right parameters can be used as an effective method to support the data-based poverty level classification process and assist the government in poverty alleviation management and planning policies.
Copyrights © 2026