JOURNAL OF APPLIED INFORMATICS AND COMPUTING
Vol. 10 No. 4 (2026): August 2026

Comparative Analysis of K-Nearest Neighbors and Support Vector Machine for Student Stress Prediction

Lutfi Khoirul Umam (Universitas PGRI Semarang)
Setyoningsih Wibowo (Universitas PGRI Semarang)
Agung Handayanto (Universitas PGRI Semarang)



Article Info

Publish Date
08 Aug 2026

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.

Copyrights © 2026






Journal Info

Abbrev

JAIC

Publisher

Subject

Computer Science & IT

Description

Journal of Applied Informatics and Computing (JAIC) Volume 2, Nomor 1, Juli 2018. Berisi tulisan yang diangkat dari hasil penelitian di bidang Teknologi Informatika dan Komputer Terapan dengan e-ISSN: 2548-9828. Terdapat 3 artikel yang telah ditelaah secara substansial oleh tim editorial dan ...