Model Klasifikasi Cerdas Gangguan Tidur Berbasis Machine Learning Random Forest pada Data Kesehatan dan Perilaku Harian - Ni'mah, Laila Maulin; Kurniawan, Defri (Building of Informatics, Technology and Science (BITS), 2025)
Sleep disorders, such as insomnia and sleep apnea, have become a significant health issue in the modern era, driven by the demands of lifestyle changes. This condition highlights the urgent need for early detection tools that are not only accurate but also easily accessible to the general public. This research aims to design and implement an intelligent classification system to automatically identify the risk of sleep disorders based on health and daily behavior data. To achieve this goal, this study applies a machine learning method using the Random Forest algorithm, which was chosen for its reliable ability to handle complex and non-linear data relationships. The data used is the "Sleep Health and Lifestyle Dataset" sourced from the Kaggle platform, covering 374 respondents with 13 relevant features. The research process included data pre-processing steps to ensure input quality, model training, and rigorous performance evaluation. The evaluation results on the test data show that the developed Random Forest model exhibited very solid performance, successfully achieving an accuracy rate of 91% and a weighted average F1-Score of 0.90. This F1-Score metric, which balances precision and recall, confirms that the model is not only accurate but also has a balanced performance in detecting each class, which is crucial for health classification. Furthermore, the feature importance analysis confirmed that Stress Level, BMI Category, and Heart Rate are the three most dominant predictor factors. The culmination of this research is the successful implementation of this predictive model into an interactive web application developed using the Streamlit framework. This application allows users to independently input their health data and receive feedback in the form of a real-time risk prediction. With an intuitive interface and easy-to-understand results, this application serves as a practical and informative initial screening tool for personal sleep health analysis.