Stress Level Prediction Based on Sleep Conditions Using Random Forest and XGBoost Methods

Alriansya, Nur Aisyiah Putri (2026) Stress Level Prediction Based on Sleep Conditions Using Random Forest and XGBoost Methods. Undergraduate thesis, UPN Veteran Jawa Timur.

[img]
Preview
Text (Cover)
Cover.pdf

Download (1MB) | Preview
[img]
Preview
Text (Chapter I)
CHAPTER 1.pdf

Download (228kB) | Preview
[img] Text (Chapter II)
CHAPTER 2.pdf
Restricted to Repository staff only until 25 May 2028.

Download (416kB)
[img] Text (Chapter III)
CHAPTER 3.pdf
Restricted to Repository staff only until 25 May 2028.

Download (518kB)
[img] Text (Chapter IV)
CHAPTER 4.pdf
Restricted to Repository staff only until 25 May 2028.

Download (936kB)
[img]
Preview
Text (Chapter V)
CHAPTER 5.pdf

Download (191kB) | Preview
[img]
Preview
Text (Bibliography)
BIBLIOGRAPHY.pdf

Download (192kB) | Preview
[img] Text (Appendix)
APPENDIX.pdf
Restricted to Repository staff only

Download (325kB)

Abstract

Stress is an increasingly widespread mental health phenomenon that impacts various aspects of individual life. Sleep conditions have a close reciprocal relationship with stress levels, where physiological parameters during sleep can serve as early indicators for detecting a person's stress level. This study aims to build and compare stress level prediction models based on sleep physiological parameters using Random Forest and XGBoost algorithms, which represent the Bagging and Boosting ensemble approaches respectively, with hyperparameter optimization using Bayesian Optimization. The dataset used is SaYoPillow from the Kaggle platform, consisting of 5,670 records with eight sleep physiological predictor variables, namely Snoring Rate, Respiration Rate, Body Temperature, Limb Movement, Blood Oxygen, Rapid Eye Movement, Sleeping Hours, and Heart Rate, along with one target variable comprising five stress level classes. Data preprocessing was performed using Min-Max Scaler normalization, and hyperparameter optimization was carried out using the Bayesian Optimization method with 30 iterations and 5-fold cross-validation. The evaluation results show that Random Forest with Bayesian Optimization achieved the best performance with an accuracy of 0.9841, precision of 0.9844, recall of 0.9841, and F1-Score of 0.9841. Meanwhile, XGBoost with and without Bayesian Optimization produced identical accuracy of 0.9762. From a series of testing scenarios, it was found that the dataset split composition is the most influential factor on model performance, where Random Forest achieved its best result at a 70:30 split ratio with an accuracy of 0.9894. The models were deployed into a Streamlit-based web application, enabling direct use for predicting stress levels based on sleep physiological parameter inputs.

Item Type: Thesis (Undergraduate)
Contributors:
ContributionContributorsNIDN/NIDKEmail
Thesis advisorRahmat, BasukiNIDN5972549basukirahmat.if@upnjatim.ac.id
Thesis advisorWahanani, Henni EndahNIDN0022097811henniendah.if@upnjatim.ac.id
Subjects: T Technology > T Technology (General) > T55.4-60.8 Industrial engineering. Management engineering
Divisions: Faculty of Computer Science > Departemen of Informatics
Depositing User: Nur Aisyiah Putri Alriansya
Date Deposited: 26 May 2026 04:09
Last Modified: 26 May 2026 05:40
URI: https://repository.upnjatim.ac.id/id/eprint/52641

Actions (login required)

View Item View Item