Perbandingan Algoritma K-Nearest Neighbors (K-NN) Dan Naive Bayes Untuk Prediksi Nilai Ujian Siswa

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. Keywords: Academic Achievement Prediction; K-Nearest Neighbors; Naive Bayes; Educational Data Mining; Cross-Validation.

Authors

Institutions

Publication Details

Journal
Jurnal Inovasi Pendidikan dan Teknologi Informasi (JIPTI)
Published
2026-11-07
DOI
https://doi.org/10.52060/jipti.v7i2.4453
Primary Topic
Online Learning and Analytics
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Perbandingan Algoritma K-Nearest Neighbors (K-NN) Dan Naive Bayes Untuk Prediksi Nilai Ujian Siswa

Zaehol Fatah, Ahmad Hamdani, Zuhrian Nur Saputra
Jurnal Inovasi Pendidikan dan Teknologi Informasi (JIPTI)
Online Learning and Analytics
article

Perbandingan Algoritma K-Nearest Neighbors (K-NN) Dan Naive Bayes Untuk Prediksi Nilai Ujian Siswa

Zaehol Fatah, Ahmad Hamdani, Zuhrian Nur Saputra
article en

Abstract

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. Keywords: Academic Achievement Prediction; K-Nearest Neighbors; Naive Bayes; Educational Data Mining; Cross-Validation.

Jurnal Inovasi Pendidikan dan Teknologi Informasi (JIPTI)Vol. 7(2)
Universitas Ibrahimy (ID)
Openalex Percentile: Top 12%
Online Learning and Analytics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon