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