Sistemasi: Jurnal Sistem Informasi
Vol 15, No 11 (2026): Sistemasi: Jurnal Sistem Informasi

Comparing Optimized Random Forest and XGBoost: Stress Classification using Digital Behavior and Sleep

M. Thoriqul Fadli (Sriwijaya University)
M. Rudi Sanjaya (Sriwijaya University)
Dwi Rosa Indah (Sriwijaya University)
M. Husni Syahbani (Sriwijaya University)



Article Info

Publish Date
21 Nov 2026

Abstract

Increased digital device usage has been associated with various mental health risks, including stress, highlighting the need for predictive approaches capable of objectively identifying digital behavior patterns. This study aims to compare the performance of Random Forest and XGBoost in classifying stress levels based on digital behavior and sleep-related features, while also examining the effects of hyperparameter optimization on the performance of both models. The study uses the Screentime vs Mental Wellness Survey 2025 dataset, comprising 400 respondents, with a class distribution of 85.2% for the "Stressed" class and 14.8% for the "Safe" class. Features suspected of acting as proxies for the target variable, namely Mental Wellness Index and Productivity, were excluded to reduce the risk of data leakage. Class balancing was performed using SMOTENC within the training pipeline, while hyperparameter optimization was conducted using GridSearchCV, with F1-Macro as the primary optimization metric. The main evaluation employed stratified 80:20 training-test splits across 21 random seeds, with F1-Macro reported as the average across all splits. Differences in model performance were analyzed using the Wilcoxon signed-rank test and the 5×2 cross-validation paired t-test. The results show that the average F1-Macro score of Random Forest increased from 0.7721 to 0.7807 following optimization, while XGBoost improved from 0.7370 to 0.7684. Random Forest achieved a higher F1-Macro score in 11 out of 21 data splits. However, neither the Wilcoxon signed-rank test (p = 0.2959) nor the 5×2 cross-validation paired t-test (p = 0.5747) revealed a statistically significant difference in model performance. Feature importance analysis indicated that screen time hours and sleep quality were the dominant features in both models. These findings are limited to the dataset used in this study, and external validation is still required to assess the generalizability of the models to other populations.

Copyrights © 2026






Journal Info

Abbrev

stmsi

Publisher

Subject

Computer Science & IT Electrical & Electronics Engineering

Description

Sistemasi adalah nama terbitan jurnal ilmiah dalam bidang ilmu sains komputer program studi Sistem Informasi Universitas Islam Indragiri, Tembilahan Riau. Jurnal Sistemasi Terbit 3x setahun yaitu bulan Januari, Mei dan September,Focus dan Scope Umum dari Sistemasi yaitu Bidang Sistem Informasi, ...