Computer Science (CO-SCIENCE)
Vol. 5 No. 1 (2025): Januari 2025

Studi Perbandingan Algoritma Random Forest dan K-Nearest Neighbors (KNN) dalam Klasifikasi Gangguan Tidur

Khasanah, Nurul (Unknown)
Eka Saputri , Daniati Uki (Unknown)
Aziz, Faruq (Unknown)
Hidayat, Taopik (Unknown)



Article Info

Publish Date
31 Jan 2025

Abstract

Sleep disorders such as insomnia and sleep apnea can significantly affect quality of life and increase the risk of chronic diseases. Early identification and classification of sleep disorders are crucial in preventing further impacts. This study aims to compare the performance of the Random Forest and K-Nearest Neighbors (KNN) algorithms in classifying sleep disorders using the Sleep Health and Lifestyle Dataset from Kaggle, which contains health and lifestyle data relevant to sleep patterns. The Random Forest and KNN algorithms were applied to classify sleep disorders into the categories 'None', 'Sleep Apnea', and 'Insomnia'. Based on the study results, the Random Forest algorithm achieved an accuracy of 89.69%, with the best performance in the 'None' category, reaching a recall of 96.08%. Meanwhile, KNN achieved an accuracy of 87.02% with K=5. Although Random Forest demonstrated superior results, challenges were still found in detecting the 'Sleep Apnea' category, where recall only reached 74.55%, likely due to data imbalance. This study shows that the Random Forest algorithm is more effective in classifying sleep disorders compared to KNN. Future research steps include data balancing and exploring other algorithms such as XGBoost to improve the performance of sleep disorder detection.

Copyrights © 2025






Journal Info

Abbrev

co-science

Publisher

Subject

Computer Science & IT

Description

Computer Science (CO-SCIENCE) pertama kali publikasi tahun 2021 dengan nomor ISSN (Elektonik): 2774-9711 yang diterbitkan oleh Lembaga Ilmu Pengetahuan Indonesia (LIPI). Computer Science (CO-SCIENCE) adalah jurnal yang diterbitkan oleh Program Studi Ilmu Komputer Universitas Bina Sarana Informatika. ...