Comparison of K-Nearest Neighbor and Naive Bayes Algorithms for Vocational High School 4 Padang Student’s Majoring Specialization
Abstract
Determining a student's major of specialization at State Vocational High School (SMKN) Negeri 4 Padang is still done subjectively, so there is a risk of causing inaccurate placement which has an impact on student learning achievement. A Data Mining approach is needed to analyze academic grade patterns in a structured and objective manner to support majoring decisions. This research aims to implement and compare the performance of the K-Nearest Neighbor (KNN) algorithm and the Naive Bayes Classifier in predicting students' majors. The research method applies a standard preprocessing approach, which includes data cleaning, normalization, and training-test data sharing. The classification model was then evaluated using the Stratified 5-Fold Cross Validation and Confusion Matrix methods to assess the accuracy and reliability of predictions. The dataset consists of 68 records of SMKN 4 Padang students with five core subject variables and three target major specialization classes. Experimental results show that the Naive Bayes Classifier produces superior performance with an average total accuracy of 64.71%. Meanwhile, the K-Nearest Neighbor algorithm (K=12) obtained an accuracy of 47.06%. The contribution of this research can provide an automated decision support system model based on objective academic data for schools in determining major interest.
Downloads
Copyright (c) 2026 Ryan Firmansyah, Agung Ramadhanu, Billy Hendrik

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.




.png)
