Healthy Lifestyle Pattern Classification Using the XGBoost Algorithm on the Lifestyle and Wellbeing Dataset

Authors

  • Nur Shafwa Aulia Sitorus Universitas Islam Negeri Sumatera Utara Author
  • Nada Asmarani Cantika Dewi Universitas Nusa Cendana Author
  • Muhammad Haikal Akmal Universitas Islam Negeri Sumatera Utara Author
  • Fitra Hidayat Lubis Universitas Islam Negeri Sumatera Utara Author
  • Agung Nugroho Universitas Islam Negeri Sumatera Utara Author

DOI:

https://doi.org/10.65230/jitcos.v2i1.66

Keywords:

Healthy Lifestyle, XGBoost, Machine Learning, Health Index, Wellbeing Prediction

Abstract

Using the Extreme Gradient Boosting (XGBoost) algorithm with the Lifestyle and Wellbeing dataset from the Kaggle platform, this study attempts to categorize healthy lifestyle patterns. The growing incidence of undesirable behaviors that have a direct impact on people's health and well-being, like stress, inactivity, and a poor work-life balance, is what spurred the research. Using 500 randomly chosen data samples that cover a range of behavioral and psychological lifestyle variables, the study uses a quantitative computational method. Data cleaning, standardization, and target label generation using a health index, which is computed as the mean of positive variables less the mean of negative variables, are all included in the preprocessing stage. With n_estimators = 100, learning_rate = 0.1, and max_depth = 4, the XGBoost model was trained using Python in the Google Colab environment. According to the results, the model's accuracy was 97%, and its precision, recall, and F1-score were all balanced. SLEEP_HOURS, DAILY_STRESS, and WORK_LIFE_BALANCE_SCORE are the most significant factors in predicting a healthy lifestyle, suggesting that psychological stability and sufficient rest are important factors in determining general well-being. As a basis for creating adaptive healthy lifestyle recommendation systems and future research incorporating physiological data from wearable devices to improve prediction accuracy, the study concludes that XGBoost successfully classifies lifestyle patterns and offers comprehensible insights into behavioral factors that contribute to health.

References

Arafat, C., Ramadhan, M. C., Jafar, F. A., Pramudya, M. R. A., & Ismanto, E. (2025). Perbandingan Algoritma Random Forest Dan Xgboost Untuk Klasifikasi Penyakit Jantung Berdasarkan Data Medis. Jurnal Fasilkom, 15(2), 430–435. https://doi.org/10.37859/jf.v15i2.9927

Dong, T., Oronti, I. B., Sinha, S., Freitas, A., Zhai, B., Chan, J., Fudulu, D. P., Caputo, M., & Angelini, G. D. (2024). Enhancing Cardiovascular Risk Prediction : Development of an Advanced Xgboost Model with Hospital-Level Random Effects. Bioengineering, 11(10), 1–17. https://doi.org/10.3390/bioengineering11101039

Fadillah, N., & Prasetyo, H. (2023). Implementasi Algoritma XGBoost untuk Prediksi Penyakit Jantung Berdasarkan Data Gaya Hidup. Jurnal Teknologi Informasi Dan Ilmu Komputer, 10(2), 156–165. https://doi.org/10.25126/jtiik.20231002.056

Fernández-blázquez, M. A., León, J. M. R. De, Sanz-blasco, R., Verche, E., Ávila-villanueva, M., Gil-moreno, M. J., Montenegro-peña, M., Terrón, C., & Fernández-garcía, C. (2025). XGBoost models based on non imaging features for the prediction of mild cognitive impairment in older adults. Scientific Reports, 15(29732), 1–16. https://doi.org/10.1038/s41598-025-14832-0

Gattaiah, N., & Sujatha, B. (2024). ROAD TRAFFIC PREDICTION IN SMART CITIES USING XGBOOST WITH FEATURE DROPOUT REGULARIZATION. Journal of The Oriental Institute M.S. University of Baroda, 73(1), 48–58.

Haksa, F. R., Endri, J., & Aryanti. (2025). Interactive Real-Time Weight Management Platform Using Machine Learning Methods. Indonesian Journal of Artificial Intelligence and Data Mining, 8(2), 397–406. https://doi.org/10.24014/ijaidm.v8i2.36874

Kim, H., Khomidov, M., & Lee, J. (2025). XGBoost and SHAP-Based Analysis of Risk Factors for Hypertension Classification in Korean Postmenopausal Women. Bioengineering, 12(6), 1–18. https://doi.org/10.3390/bioengineering12060659

Lestari, M., & Wibowo, A. (2021). Penerapan Metode Gradient Boosting untuk Prediksi Kesehatan Masyarakat. Jurnal Komputer Terapan, 9(2), 87–95. https://doi.org/10.33322/jkt.v9i2.1024

Maulidah, M., & Hidayati, N. (2024). PREDIKSI KESEHATAN TIDUR DAN GAYA HIDUP MENGGUNAKAN MACHINE LEARNING. CONTEN : Computer and Network Technology, 4(1), 81–86. https://doi.org/10.31294/conten.v4i1.4918

Nopour, R. (2025). Machine learning models in enhancing prediction of health-related indices among older adults : A scoping review. Heliyon, 11(12), 1–12. https://doi.org/10.1016/j.heliyon.2025.e43510

Nurhaliza, A., & Saputra, R. (2022). Prediksi Tingkat Kesehatan Berdasarkan Data Gaya Hidup Menggunakan Algoritma Random Forest. Jurnal Sistem Cerdas, 5(3), 101–109. https://doi.org/10.30812/jsc.v5i3.1123

Nuryana, M., Hermawati, I., Sugiyanto, Adnan, A., Hidayat, D., Nainggolan, T., Sumarno, S., Suryani, R., Rusmiyati, C., Jayaputra, A., Suryani, Setyati, S., Prasetyo, A., Saputra, A., & Supratikta, H. (2025). Lifestyle and psychosocial predictors of health resilience among Indonesian disaster preparedness cadres (TAGANA): a machine learning approach. Frontiers in Public Health, November, 1–8. https://doi.org/10.3389/fpubh.2025.1673734

Orhan, F., & Kurutkan, M. N. (2025). Predicting total healthcare demand using machine learning : separate and combined analysis of predisposing, enabling, and need factors. BMC Health Services Research, 25(366), 1–27. https://doi.org/10.1186/s12913-025-12502-5

Pratama, Y., & Handayani, R. (2021). Analisis Faktor-Faktor yang Mempengaruhi Gaya Hidup Sehat Masyarakat Perkotaan. Jurnal Kesehatan Masyarakat Indonesia, 7(2), 88–97. https://doi.org/10.36565/jkmi.v7i2.240

Rahman, F., & Sari, D. P. (2022). Analisis Pola Hidup Sehat Masyarakat dengan Metode Machine Learning. Jurnal Ilmiah Informatika Global, 13(1), 45–53. https://doi.org/10.31294/jiig.v13i1.12345

Ryseno, F. A., Mardianto, F., Wibowo, Y. P., Nugraha, F., & Kusuma, E. (2024). Nutritional Analysis Of Traditional Indonesian Food Using Machine Learning. Journal of Artificial Intelligence and Engineering Applications, 3(3), 644–649. https://doi.org/10.59934/jaiea.v3i3.476

Sitompul, L. R., & Nasution, A. (2025). Perbandingan Algoritma XGBoost, Random Forest, dan Logistic Regression dalam Klasifikasi Penyakit Stroke. Jurnal SINKRON, 10(1), 90–97. https://doi.org/10.33395/sinkron.v10i1.14794

Syahidah, H., Irsandi, N., Ajizah, A. N., & Amelia. (2025). Obesity Prediction Using Machine Learning Algorithms. IJATIS: Indonesian Journal of Applied Technology and Innovation Science, 2(1), 53–62. https://doi.org/10.57152/ijatis.v2i1.1869

Wardhana, R. G., Wang, G., & Sibuea, F. (2023). PENERAPAN MACHINE LEARNING DALAM PREDIKSI TINGKAT KASUS PENYAKIT DI INDONESIA. Journal of Information System Management, 5(1), 40–45. https://doi.org/10.24076/joism.2023v5i1.1136

Wardhani, K. D. K., & Novayani, W. (2024). Principal Component Analysis for Prediabetes Prediction using Extreme Gradient Boosting (XGBoost). Scientific Journal of Informatics, 11(3), 863–872. https://doi.org/10.15294/sji.v11i3.13416

Yan, T., Shen, S., Zhou, A., & Chen, X. (2022). Prediction of geological characteristics from shield operational parameters by integrating grid search and K-fold cross validation into stacking classification algorithm. Journal of Rock Mechanics and Geotechnical Engineering, 14(4), 1292–1303. https://doi.org/10.1016/j.jrmge.2022.03.002

Downloads

Published

30-06-2026

Issue

Section

Articles

How to Cite

Aulia Sitorus, N. S., Cantika Dewi, N. A. ., Haikal Akmal, M. ., Lubis, F. H. ., & Agung Nugroho. (2026). Healthy Lifestyle Pattern Classification Using the XGBoost Algorithm on the Lifestyle and Wellbeing Dataset. Journal of Information Technology and Computer System, 2(1), 31-40. https://doi.org/10.65230/jitcos.v2i1.66

Similar Articles

You may also start an advanced similarity search for this article.