Instal : Jurnal Komputer
Vol 18 No 06 (2026): Instal : Jurnal Komputer

Implementasi Algoritma K-Nearest Neighbor dalam Sistem Rekomendasi Jurusan Siswa SMA Negeri 2 Tanjung Morawa

Steven Ari Paradongan (Unika Santo Thomas Medan)
Romanus Damanik (Universitas Katolik Santo Thomas Medan)
Winner Sianturi (Dinas Kab. Deli Serdang)



Article Info

Publish Date
20 Aug 2026

Abstract

This article discusses the implementation of the K-Nearest Neighbor (KNN) algorithm within a web-based recommendation system aimed at categorizing students from SMA Negeri 2 Tanjung Morawa into two distinct subject groups. The input data merges academic performance with insights regarding students’ interests and indicators of their abilities. Prior to classification, records of students and those of alumni with labels undergo Min-Max normalization, and the measurement of similarity is conducted through Euclidean Distance. Recommendations are generated with K set to 5, choosing the most commonly occurring label from the nearest neighbors. The system utilizes 128 labeled alumni records for training and analyzes 10 student records for testing. The results of the recommendation place 7 students in Subject Group 1 and 3 students in Subject Group 2. The effectiveness of the model is assessed by applying an 80:20 division to the alumni dataset, with the classification results being analyzed using a confusion matrix. The testing yields an accuracy of 80.00%, a precision of 67.86%, a recall of 65.00%, and an F1-score of 66.12%. Additionally, the evaluation section notes an average confidence of 98.08%, an average distance of 0.497, and confirms that all ten outputs fall within the high-confidence category. These results indicate that the KNN-based system is capable of offering data-driven assistance for recommendations on subject groups. However, enhancements are still necessary, especially regarding the enlargement and diversification of the training data as well as improving the attributes utilized within the recommendation model.

Copyrights © 2026






Journal Info

Abbrev

Instal

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management

Description

Focus And Scope Instal : Jurnal Komputer is a peer-reviewed scientific journal published by CV. Cattleya Darmaya Fortuna which has been published since 2009. The aim of this journal is to publish high-quality articles dedicated to all aspects of the latest outstanding developments in the field of ...