Answers are grounded in this paper and cite their sources.
At SMPN 1 Banyuwangi, a district-level reference school, data mining technology for academic prediction has not yet been implemented. This delay results in the delayed identification of students experiencing learning difficulties, as detection is only conducted after the School Exam. This study aims to compare the accuracy of the K-Nearest Neighbors (K-NN) and Naive Bayes algorithms in classifying School Exam performance based on historical report card grades. This quantitative study, with a comparative design and cross-sectional approach, involved 336 students from SMPN 1 Banyuwangi. The data source was derived from report card grade documents from semesters 7.1 to 9.1, covering four main subjects: Mathematics, Science, English, and Indonesian, resulting in 20 predictive features. School Exam scores were further categorized into three levels: A for the range 86–100, B for 76–85, and C for 61–75. The model evaluation process was carried out using 5-fold cross validation, confusion matrix, and AUC-ROC curves. The research findings showed that both algorithms obtained equivalent accuracy values, namely 86.76% on the test data group. However, based on the cross validation results, the Naive Bayes algorithm showed a superior average accuracy (87.80%) when compared to K-NN (85.42%), accompanied by a lower standard deviation (1.08% compared to 1.69%). The AUC value produced by Naive Bayes was also higher (0.790) compared to K-NN (0.447). The optimal parameters for K-NN were obtained at a value of k = 3 with the Euclidean distance metric, while Naive Bayes reached optimal conditions at a var_smoothing value of 1e-09. Based on the cross validation results, the Naive Bayes algorithm proved to be more consistent and stable than K-NN in predicting School Exam scores at SMPN 1 Banyuwangi. The prediction system developed using Naive Bayes has the potential to be implemented as an early warning system to detect students at risk of achieving below minimum achievement.
No takes yet. Share an insight, caveat, or question.
Saputra et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: