Back to portfolio

PEARC25 · NSF LCCF Advanced Computing Student Challenge

Predicting Student Stress Levels from Psychological, Physical, Environmental, Academic and Social Factors

Dumisani Chikomo · Berea College

Computation on TACC Stampede3 · Summer 2025

Abstract

Student stress is common, and support services usually find out about it late. Using survey data from 1,100 students across 20 features, I trained and compared six classifiers to sort students into low, medium and high stress. With 5-fold stratified cross-validation and grid-search tuning, the best models reached 88.2% accuracy (macro F1 0.88) on a held-out test set of 220 students. A simple logistic regression matched a tuned random forest, which suggests the signal is largely linear. Bullying, future career concerns, anxiety and depression had the strongest correlations with stress, while the random forest leaned most on blood pressure, sleep quality and basic needs.

01Research question

Can a student's stress level be predicted from information a college could realistically collect, and which factors carry the most signal? A reliable early-warning model would let counselors and advisors reach out before stress turns into burnout.

02Data

I used the Student Stress Factors dataset (Kaggle): 1,100 students, 20 numeric features and a 3-class target, stress_level (0 = low, 1 = medium, 2 = high). The classes are close to balanced (373 / 358 / 369), and the data has no missing values or duplicate rows.

Table 1. Feature groups used as model inputs.

GroupFeatures
Psychologicalanxiety level, self-esteem, mental health history, depression
Physicalheadache, blood pressure, sleep quality, breathing problems
Environmentalnoise level, living conditions, safety, basic needs
Academicacademic performance, study load, teacher-student relationship
Socialfuture career concerns, social support, peer pressure, extracurricular activities, bullying
Bar and pie charts of the three stress classes
Figure 1. Distribution of the target. The three stress levels are close to evenly split, so accuracy is a fair headline metric.

03Methods

  1. Exploratory analysis: Pearson correlations with the target, a full correlation heatmap, and per-class distributions of the top features.
  2. Preprocessing: stratified 80/20 train/test split (880 / 220), then standardization fitted on the training set only.
  3. Model comparison: logistic regression, decision tree, random forest, SVM (RBF), k-nearest neighbors and gradient boosting, each scored with 5-fold stratified cross-validation.
  4. Tuning: grid search over 108 random forest configurations and 32 SVM configurations (5 folds each).
  5. Evaluation: accuracy and weighted F1 on the untouched test set, plus per-class precision and recall and a confusion matrix.

The best random forest used 50 trees with a maximum depth of 10 (cross-validated accuracy 88.5%). Work ran in Python with pandas, NumPy, scikit-learn, matplotlib and seaborn, in Jupyter on TACC's Stampede3 supercomputer.

Table 2. 5-fold cross-validated accuracy on the training set, before tuning (mean ± standard deviation, in percentage points).

ModelMean accuracy± SD
Gradient Boosting88.1%2.1
Decision Tree88.0%3.5
Logistic Regression87.7%2.8
Random Forest87.3%2.5
SVM (RBF)86.7%2.8
K-Nearest Neighbors86.4%3.8

04Results

On the held-out test set, logistic regression and the tuned random forest tied at 88.2% accuracy. Gradient boosting followed at 87.3%. Tuning helped the random forest in cross-validation, but the tuned SVM generalized worst (84.5%).

Table 3. Test-set performance (220 students).

ModelAccuracyF1 (weighted)
Logistic Regression88.2%0.882
Random Forest (tuned)88.2%0.881
Gradient Boosting87.3%0.872
K-Nearest Neighbors85.0%0.850
SVM (tuned)84.5%0.847
Bar charts comparing test accuracy and F1 for five models
Figure 2. Test accuracy (left) and F1 (right) for each model. The top two are within rounding of each other.

Table 4. Per-class results for the tuned random forest.

ClassPrecisionRecallF1Students
Low (0)0.900.820.8674
Medium (1)0.890.920.9072
High (2)0.860.910.8874
Confusion matrix for the tuned random forest
Figure 3. Confusion matrix for the tuned random forest. The largest share of errors is low-stress students flagged as medium or high (recall 0.82), the safer direction for an early-warning tool.

05Which factors matter

Two different questions give two different lists. Asking which features move with stress (correlation), the strongest are bullying (r = 0.75), future career concerns (0.74), anxiety (0.74), depression (0.73) and headaches (0.71). Asking which features the random forest relies on to separate classes, the top three are blood pressure, sleep quality and basic needs.

The gap is expected: many features are correlated with each other, so the model can lean on one and treat the rest as redundant. Neither list shows cause and effect.

Bar chart of feature correlations with stress level
Figure 4. Correlation of the strongest features with stress level.
Random forest feature importance chart
Figure 5. Random forest feature importance (mean decrease in impurity). This shows what the model uses, not what causes stress.

06Limitations

  • One public dataset of self-reported survey answers; results may not transfer to a specific college without retraining.
  • A 220-student test set means a single misclassification moves accuracy by about 0.5 points, so the top models are effectively tied.
  • Correlation and feature importance describe patterns in the data, not causes.
  • Predicting stress about individuals raises privacy and consent questions that any real deployment would need to address first.

07Conclusion and next steps

Stress level can be predicted from routine survey data with about 88% accuracy, and a simple, explainable logistic regression does as well as a tuned ensemble. Next steps are SHAP values to explain individual predictions, validation on a more diverse student population, and a student-facing tool. That last step became my Class-Life Balance Optimizer.

Cite

Chikomo, D. (2025). Predicting student stress levels from
psychological, physical, environmental, academic and social
factors. PEARC25, NSF LCCF Advanced Computing Student Challenge.