Optimasi Model XGBoost dengan Genetic Algorithm untuk Prediksi Kesehatan Mental Siswa Sekolah Menengah Berbasis Machine Learning
DOI:
https://doi.org/10.35870/jtik.v9i4.4013Keywords:
Mental Health Prediction, Machine Learning, Xgboost Regressor, Genetic Algorithm, Hyperparameter OptimizationAbstract
Mental health is a vital aspect of human well-being, yet often neglected. Recent studies report a rise in depression, anxiety, and stress among adolescents, especially post-COVID-19. Machine learning has emerged as a powerful tool for predicting mental health conditions. This study employs the XGBoost Regressor using a regression-based ML approach to predict mental health high school students. To enhance accuracy, hyperparameter optimization is conducted using a Genetic Algorithm (GA) to identify the optimal parameter set. The baseline model achieved an MSE of 0.3698, RMSE of 0.6081, and MAPE of 14.09%. After GA optimization, performance improved to an MSE of 0.3092 (16.4% reduction), RMSE of 0.5560 (8.6% reduction), and MAPE of 12.88% (8.6% reduction). These results demonstrate the model's effectiveness for early mental health screening in educational settings, enabling timely interventions by school counselors and healthcare providers.
Downloads
References
Abdul Rahman, H., et al. (2023). Machine learning-based prediction of mental well-being using health behavior data from university students. Bioengineering, 10(5). https://doi.org/10.3390/bioengineering10050575.
Ahsan, M. M., Mahmud, M. P., Saha, P. K., Gupta, K. D., & Siddique, Z. (2021). Effect of data scaling methods on machine learning algorithms and model performance. Technologies, 9(3), 52.
Ali, G. C., Ryan, G., & De Silva, M. J. (2016). Validated screening tools for common mental disorders in low and middle income countries: a systematic review. PloS one, 11(6), e0156939.
Alibrahim, H., & Ludwig, S. A. (2021). Hyperparameter optimization: Comparing genetic algorithm against grid search and Bayesian optimization. IEEE. https://doi.org/10.1109/CEC45853.2021.9504761.
Ambarwari, A., Adrian, Q. J., & Herdiyeni, Y. (2020). Analisis pengaruh data scaling terhadap performa algoritme machine learning untuk identifikasi tanaman. RESTI, 4(3), 117–122. https://doi.org/10.29207/RESTI.V4I1.1517.
Arora, A., Bojko, L., Kumar, S., Lillington, J., Panesar, S., & Petrungaro, B. (2023). Assessment of machine learning algorithms in national data to classify the risk of self-harm among young adults in hospital: A retrospective study. International Journal of Medical Informatics, 177. https://doi.org/10.1016/j.ijmedinf.2023.105164.
Ayodele, A., Adetunla, A., & Akinlabi, E. (2024). Prediction of depression severity and personalised risk factors using machine learning on multimodal data. International Journal of Online and Biomedical Engineering, 20(9), 130–143. https://doi.org/10.3991/ijoe.v20i09.47581.
Bajpai, P., & Kumar, M. (2010). Genetic algorithm–an approach to solve global optimization problems. Indian Journal of computer science and engineering, 1(3), 199-206.
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 785–794). Association for Computing Machinery. https://doi.org/10.1145/2939672.2939785.
Chung, J., & Teo, J. (2023). Single classifier vs. ensemble machine learning approaches for mental health prediction. Brain Informatics, 10(1). https://doi.org/10.1186/s40708-022-00180-6.
Dao, D. M. (2025). Prevalence and patterns of anxiety, depressive, hyperactivity, and inattention symptoms among secondary and high school students: A cross-sectional study. Multidisciplinary Reviews, 8(5). https://doi.org/10.31893/multirev.2025161.
Gen, M., & Cheng, R. C. H. (2000). Genetic algorithms & engineering optimization. Wiley. https://doi.org/10.1002/9780470172261.
Gil, M., Kim, S.-S., & Min, E. J. (2022). Machine learning models for predicting risk of depression in Korean college students: Identifying family and individual factors. Frontiers in Public Health. https://doi.org/10.3389/fpubh.2022.1023010.
Kshirsagar, P. R., Manoharan, H., Selvarajan, S., Alterazi, H. A., Singh, D., & Lee, H. N. (2022). Perception exploration on robustness syndromes with pre-processing entities using machine learning algorithm. Frontiers in Public Health, 10. https://doi.org/10.3389/fpubh.2022.893989.
Mullick, T., Radovic, A., Shaaban, S., & Doryab, A. (2022). Predicting depression in adolescents using mobile and wearable sensors: Multimodal machine learning–based exploratory study. JMIR Formative Research, 6(6). https://doi.org/10.2196/35807.
Patt, R., & Meva, D. (2024). Advancements in machine learning-based mental health prediction: A comprehensive review. In S. Tanwar, P. K. Singh, M. Ganzha, & G. Epiphaniou (Eds.), Proceedings of Fifth International Conference on Computing, Communications, and Cyber-Security (pp. 497–507). Springer Nature Singapore. https://doi.org/10.1007/978-981-97-2550-2_36.
Sarker, I. H. (2021). Deep learning: A comprehensive overview on techniques, taxonomy, applications and research directions. Springer. https://doi.org/10.1007/s42979-021-00815-1
Shen, Y. (2023). High school emotional well-being: Identifying factors and creating a working model for prediction. Journal of Student Research. https://doi.org/10.47611/jsrhs.v12i3.4743.
Suratno, T., & Rarasati, N. (2019). Optimization of genetic algorithm for implementation designing and modeling in academic scheduling. EKSAKTA, 20. https://doi.org/10.24036/eksakta/vol20-iss01/166.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Nor Riduan, Alva Hendi Muhammad

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
1. Copyright Retention and Open Access License
Authors retain copyright of their work and grant the journal non-exclusive right of first publication under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
This license allows unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
2. Rights Granted Under CC BY 4.0
Under this license, readers are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, including commercial use
- No additional restrictions — the licensor cannot revoke these freedoms as long as license terms are followed
3. Attribution Requirements
All uses must include:
- Proper citation of the original work
- Link to the Creative Commons license
- Indication if changes were made to the original work
- No suggestion that the licensor endorses the user or their use
4. Additional Distribution Rights
Authors may:
- Deposit the published version in institutional repositories
- Share through academic social networks
- Include in books, monographs, or other publications
- Post on personal or institutional websites
Requirement: All additional distributions must maintain the CC BY 4.0 license and proper attribution.
5. Self-Archiving and Pre-Print Sharing
Authors are encouraged to:
- Share pre-prints and post-prints online
- Deposit in subject-specific repositories (e.g., arXiv, bioRxiv)
- Engage in scholarly communication throughout the publication process
6. Open Access Commitment
This journal provides immediate open access to all content, supporting the global exchange of knowledge without financial, legal, or technical barriers.
