Student stress is a multidimensional problem influenced by psychological, physical, academic, and environmental factors. This study aims to identify student stress levels using the Extreme Gradient Boosting (XGBoost) algorithm, evaluate its classification performance, and determine the most influential variables. The study used the StressLevelDataset containing 1,100 observations, 20 predictor variables, and one target variable representing low, moderate, and high stress. The research stages followed data collection, data understanding, preprocessing, stratified data splitting, baseline modeling, Grid Search hyperparameter tuning, evaluation, and feature importance analysis. The tuned XGBoost model achieved 86.82% accuracy, 86.94% precision, 86.85% recall, and 86.79% F1-score on the test set. Hyperparameter tuning did not materially increase test accuracy, but reduced the training-test accuracy gap from 13.18 to 6.82 percentage points, indicating improved generalization and reduced overfitting. Feature importance identified sleep_quality (32.6%), academic_performance (29.8%), and blood_pressure (19.2%) as the three most influential variables. The results demonstrate that XGBoost can provide a stable data-driven approach for identifying student stress levels.
Copyrights © 2026