Perbandingan Algoritma XGBoost, Random Forest, LightGBM untuk Prediksi Tingkat Stres Mahasiswa
DOI:
https://doi.org/10.24002/jiaj.v7i2.14868Keywords:
Explainable AI, SHAP, XGBoost, Ensemble Learning, Stres MahasiswaAbstract
Stres akademik mahasiswa merupakan permasalahan penting di pendidikan tinggi. Penelitian ini mengembangkan model prediksi tingkat stres mahasiswa yang akurat sekaligus dapat dijelaskan (explainable). Pendekatan supervised learning diterapkan pada dataset publik StressLevelDataset yang berisi 1.100 sampel dengan dua puluh fitur asli dan tiga fitur rekayasa berbasis domain, yaitu academic_stress_index, environment_quality_index, dan social_stress_score. Tiga algoritma ensemble learning, yakni XGBoost, Random Forest, dan LightGBM, dilatih dan dievaluasi menggunakan Accuracy, Macro F1-Score, dan ROC-AUC. Metode Explainable AI berbasis SHAP digunakan untuk menganalisis kontribusi dan interaksi fitur. Berdasarkan Cross-Validation 5-fold, XGBoost dipilih sebagai model terbaik dengan rata-rata Macro F1-Score 0,8864 (±0,0243) dan akurasi uji 89,55%, meskipun Friedman Test menunjukkan perbedaan antarmodel tidak signifikan. Analisis SHAP mengidentifikasi blood_pressure, social_stress_score, sleep_quality, environment_quality_index, dan academic_stress_index sebagai fitur dengan kontribusi terbesar terhadap prediksi, sehingga stres mahasiswa dipandang sebagai fenomena multidimensional yang melibatkan faktor psikologis, akademik, fisik, dan sosial.
Academic stress is an important problem in higher education. This study develops a student stress level prediction model that is both accurate and explainable. A supervised learning approach was applied to the public StressLevelDataset containing 1,100 samples with twenty original features and three domain-based engineered features, namely academic_stress_index, environment_quality_index, and social_stress_score. Three ensemble learning algorithms, XGBoost, Random Forest, and LightGBM, were trained and evaluated using Accuracy, Macro F1-Score, and ROC-AUC. SHAP-based Explainable AI was used to analyze feature contributions and interactions. Based on 5-fold Cross-Validation, XGBoost was selected as the best model with a mean Macro F1-Score of 0.8864 (±0.0243) and test accuracy of 89.55%, although the Friedman Test showed no significant difference among the models. SHAP analysis identified blood_pressure, social_stress_score, sleep_quality, environment_quality_index, and academic_stress_index as the features contributing most to the predictions, indicating that student stress is a multidimensional phenomenon involving psychological, academic, physical, and social factors.
References
[1] G. Barbayannis, M. Bandari, X. Zheng, H. Baquerizo, K. W. Pecor, and X. Ming, “Academic Stress and Mental Well-Being in College Students: Correlations, Affected Groups, and COVID-19,” Front. Psychol., vol. 13, Art. no. 886344, 2022, doi: 10.3389/fpsyg.2022.886344.
[2] E. J. Sigalingging, “Gambaran Stres Akademik pada Siswa di SMA Muhammadiyah 1 Medan,” Skripsi, Universitas Medan Area, Medan, Indonesia, 2025. [Online]. Available: https://repositori.uma.ac.id/jspui/handle/123456789/27147
[3] N. Olson, R. Oberhoffer-Fritz, B. Reiner, and T. Schulz, “Stress, student burnout and study engagement – a cross-sectional comparison of university students of different academic subjects,” BMC Psychol., vol. 13, no. 1, 2025, doi: 10.1186/s40359-025-02602-6.
[4] A. Daza, N. Saboya, J. I. Necochea-Chamorro, K. Zavaleta Ramos, and Y. del R. Vásquez Valencia, “Systematic review of machine learning techniques to predict anxiety and stress in college students,” Informatics Med. Unlocked, vol. 43, Art. no. 101391, 2023, doi: 10.1016/j.imu.2023.101391.
[5] A. Barredo Arrieta et al., “Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI,” Inf. Fusion, vol. 58, pp. 82–115, 2020, doi: 10.1016/j.inffus.2019.12.012.
[6] S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), 2017, pp. 4766–4775.
[7] A. Chintalapati, R. Annamalai, K. Enkhbat, F. Ozaydin, and K. Sivashanmugam, “Enhancing Stress Identification Using Machine Learning: Revealing Key Factors with SHAP-Driven Explainable AI,” Preprints, 2024, doi: 10.20944/preprints202409.2135.v1.
[8] L. Breiman, “Random Forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, 2001, doi: 10.1023/A:1010933404324.
[9] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., 2016, pp. 785–794, doi: 10.1145/2939672.2939785.
[10] G. Ke et al., “LightGBM: A highly efficient gradient boosting decision tree,” in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), 2017, pp. 3147–3155.
[11] P. Florek and A. Zagdański, “Benchmarking state-of-the-art gradient boosting algorithms for classification,” arXiv preprint arXiv:2305.17094, 2023.
[12] R. de Filippis and A. Al Foysal, “Comprehensive analysis of stress factors affecting students: a machine learning approach,” Discov. Artif. Intell., vol. 4, no. 1, 2024, doi: 10.1007/s44163-024-00169-6.
[13] M. I. Jordan and T. M. Mitchell, “Machine learning: Trends, perspectives, and prospects,” Science, vol. 349, no. 6245, pp. 255–260, 2015, doi: 10.1126/science.aaa8415.
[14] A. Shvetcov et al., “Passive sensing data predicts stress in university students: a supervised machine learning method for digital phenotyping,” Front. Psychiatry, vol. 15, Art. no. 1422027, 2024, doi: 10.3389/fpsyt.2024.1422027.
[15] F. Lotfi, B. Rodić, A. Labus, and Z. Bogdanović, “Smart healthcare: developing a pattern to predict the stress and anxiety among university students using machine learning technology,” J. Univers. Comput. Sci., vol. 30, no. 10, pp. 1316–1342, 2024, doi: 10.3897/jucs.116174.
[16] S. Arya, Anju, and N. A. Ramli, “Predicting the stress level of students using Supervised Machine Learning and Artificial Neural Network (ANN),” Indian J. Eng., vol. 21, no. 56, pp. 1–24, 2024, doi: 10.54905/disssi.v21i55.e9ije1684.
[17] C. Molnar, Interpretable Machine Learning: A Guide for Making Black Box Models Explainable, 2nd ed. 2022. [Online]. Available: https://christophm.github.io/interpretable-ml-book/
[18] P. Chapman et al., “CRISP-DM 1.0: Step-by-step data mining guide,” SPSS Inc., 2000.
[19] F. Doshi-Velez and B. Kim, “Towards A Rigorous Science of Interpretable Machine Learning,” arXiv preprint arXiv:1702.08608, 2017.
[20] S. Ovi, “Student Stress Monitoring Datasets,” Kaggle, 2024. [Online]. Available: https://www.kaggle.com/datasets/mdsultanulislamovi/student-stress-monitoring-datasets/data
[21] S. Zhang, S. Rehman, Y. Zhao, E. Rehman, and B. Yaqoob, “Exploring the interplay of academic stress, motivation, emotional intelligence, and mindfulness in higher education: a longitudinal cross-lagged panel model approach,” BMC Psychol., vol. 12, no. 1, 2024, doi: 10.1186/s40359-024-02284-6.
[22] Z. Gong, H. Wang, M. Zhong, and Y. Shao, “College students’ learning stress, psychological resilience and learning burnout: status quo and coping strategies,” BMC Psychiatry, vol. 23, no. 1, pp. 1–7, 2023, doi: 10.1186/s12888-023-04783-z.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright of this journal is assigned to Jurnal Informatika Atma Jogja as the journal publisher by the knowledge of author, whilst the moral right of the publication belongs to author. Every printed and electronic publications are open access for educational purposes, research, and library. The editorial board is not responsible for copyright violation to the other than them aims mentioned before. The reproduction of any part of this journal (printed or online) will be allowed only with a written permission from Jurnal Informatika Atma Jogja .


