Building of Informatics, Technology and Science
Vol 8 No 2 (2026): September 2026

A Comparative Evaluation of Random Forest, SVM, KNN, Logistic Regression, and Gradient Boosting for Stress Prediction

Janur Alaudin Syah (Universitas Teknologi Digital Indonesia, Yogyakarta)
Sumiyatun Sumiyatun (Universitas Teknologi Digital Indonesia, Yogyakarta)



Article Info

Publish Date
22 Sep 2026

Abstract

Student stress has become a critical concern in contemporary education, necessitating early detection systems to enable timely intervention. This study presents a comprehensive comparative evaluation of five machine learning algorithms Logistic Regression, K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Random Forest, and Gradient Boosting for classifying student stress levels into three categories (low, moderate, high). Using a dataset of 14,003 students with 14 academic, demographic, and psychosocial features, the research addresses the significant class imbalance (high stress: 50.7%, moderate: 29.1%, low: 20.2%) through systematic multi-metric assessment. Random Forest with 300 trees and class_weight='balanced' demonstrated superior performance across all metrics: accuracy (93.47%), precision (93.97%), recall (93.47%), F1-score (93.43%), and ROC-AUC (0.992). Feature importance analysis identified AssignmentCompletion, Attendance, and ExamScore as the most influential predictors. The contributions of this research include: (1) a comprehensive comparative evaluation of five foundational ML algorithms on a large-scale imbalanced educational dataset; (2) the explicit demonstration of Random Forest's effectiveness in handling class imbalance through built-in class weighting; (3) the identification of key academic predictors of student stress through feature importance analysis; and (4) the provision of a scalable evidence-based framework for early stress detection with practical implementation guidance for educational institutions.

Copyrights © 2026






Journal Info

Abbrev

bits

Publisher

Subject

Computer Science & IT

Description

Building of Informatics, Technology and Science (BITS) is an open access media in publishing scientific articles that contain the results of research in information technology and computers. Paper that enters this journal will be checked for plagiarism and peer-rewiew first to maintain its quality. ...