This study aims to apply the K-Nearest Neighbor (KNN) algorithm to classify student academic performance based on several variables, namely age, study hours, attendance percentage, additional activities, and student academic grades. Academic performance is classified into three categories: low, medium, and high. The study was conducted using a data mining approach through data preprocessing, categorical to numeric data transformation, data normalization using StandardScaler, division of training and test data, and the classification process using the KNN algorithm. To determine the best parameters, several K values were tested and the optimal value of K = 1 was obtained based on the highest accuracy. The results showed that the KNN algorithm was able to classify student academic performance with an accuracy level of 96.4%. Evaluation results based on precision, recall, F1-score, and confusion matrix showed that the model had good classification performance with a relatively small error rate. In addition, the results of parameter testing showed that the selection of the K value affected the performance of the classification model. Based on the results of the study, the K-Nearest Neighbor algorithm has proven effective as a classification method to assist in analyzing student academic performance and can be an alternative to support decision-making in the field of education.
Copyrights © 2026