Comparison of K-Nearest Neighbor and Naive Bayes Algorithms for Vocational High School 4 Padang Student’s Majoring Specialization

  • Ryan Firmansyah Universitas Putra Indonesia YPTK Padang
  • Agung Ramadhanu Universitas Putra Indonesia YPTK Padang
  • Billy Hendrik Universitas Putra Indonesia YPTK Padang
Keywords: Data Mining, K-Nearest Neighbor (KNN), Naive Bayes Classifier, Majoring Decision, Model Evaluation

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

Download data is not yet available.
Published
2026-10-27
How to Cite
Firmansyah, R., Ramadhanu, A., & Hendrik, B. (2026). Comparison of K-Nearest Neighbor and Naive Bayes Algorithms for Vocational High School 4 Padang Student’s Majoring Specialization. Jurnal Media Computer Science, 5(4), 1635-1648. https://doi.org/10.37676/jmcs.v5i4.12460
Section
Articles