Syahrina Indah Harahap
Universitas Islam Negeri Sumatera Utara Medan

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Klasifikasi Gaya Hidup Siswa Menggunakan Metode K-Nearest Neighbors Syahrina Indah Harahap; Ilka Zufria; Abdul Halim Hasugian
JURNAL ILMIAH SAINS TEKNOLOGI DAN INFORMASI Vol. 4 No. 2 (2026): Vol. 4 No. 2 (2026): April : Jurnal Ilmiah Sains Teknologi dan Informasi
Publisher : CV. ALIM'SPUBLISHING

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.59024/jiti.v4i2.1785

Abstract

This research aims to classify students’ lifestyles using the K-Nearest Neighbors (KNN) algorithm. The dataset consists of 392 high school students obtained from Kaggle, with key attributes including study hours, social media usage, Netflix viewing duration, attendance, sleep quality, internet quality, mental health, and extracurricular activities. KNN was chosen for its simplicity in distance-based classification, measured using Euclidean Distance. The data was divided into training and testing sets, then evaluated using accuracy and a confusion matrix. The results show that KNN effectively classifies students’ lifestyles into four categories: healthy, less active, at risk, and highly at risk. This classification is expected to assist educational institutions, parents, and students in understanding lifestyle patterns and their impact on academic performance and mental well-being. Furthermore, this study emphasizes the relevance of applying machine learning in education, aligned with Islamic values concerning health, discipline, and the optimal use of time.