Lutfi Khoirul Umam
Universitas PGRI Semarang

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

Found 1 Documents
Search

Comparative Analysis of K-Nearest Neighbors and Support Vector Machine for Student Stress Prediction Lutfi Khoirul Umam; Setyoningsih Wibowo; Agung Handayanto
Journal of Applied Informatics and Computing Vol. 10 No. 4 (2026): August 2026
Publisher : Politeknik Negeri Batam

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.30871/jaic.v10i4.13224

Abstract

Student stress has emerged as an important issue because it can negatively affect both academic achievement and mental well-being. The growing development of machine learning techniques has enabled the creation of predictive models that can classify stress levels using various student-related factors. This research evaluates and compares the effectiveness of the K-Nearest Neighbors (KNN) and Support Vector Machine (SVM) algorithms in predicting student stress categories. The dataset was sourced from Kaggle and contains questionnaire-based data, including variables such as sleep quality, frequency of headaches, academic achievement, study workload, participation in extracurricular activities, and stress level classifications. The study followed several stages, including data preprocessing, feature normalization, model development, and performance assessment. Model evaluation was conducted using accuracy, precision, recall, F1-score, and confusion matrix metrics. To validate the practical implementation of the models, both algorithms were incorporated into a web-based application built with the Flask framework and supported by a MySQL database. The experimental results revealed that the KNN algorithm delivered superior classification performance compared to SVM. KNN obtained an accuracy score of 88.46% and a weighted F1-score of 0.89, whereas SVM achieved 46.15% accuracy with a weighted F1-score of 0.41. These findings suggest that KNN is more effective in identifying patterns within the student survey data. In addition, the successful deployment of the prediction system demonstrates that conventional machine learning methods can be utilized to provide real-time assessments of student stress levels and support mental health monitoring efforts.