Sleep is one of the basic human needs. Sleep has some functions namely to restore energy, refresh the brain, improve immune function to the body. Sleep analysis is often used to identify sleep-related human health. In many cases sleep disorders may cause particular diseases. One approach to detect sleep disorders is by investigating the stages of human sleep. Studies in detecting the stages of sleep can be done with polysomnography. One alternative way to analyze sleep stages is to design a system that aims to detect signal waves based on an electrocardiogram (ECG).
In this study, the writer designed a machine learning-based software used for the classification of sleep stages in humans, where the state of wakefulness and awakening during the sleep period became an indicator of each subject. From these conditions, classification was carried out using Support Vector Machine (SVM) method and optimized with Grid search. The public dataset available on physionet was used in this study and involved 10 subjects to obtain the input signal. The ECG used as the input signal came from three hotler channels (V5, CC5, V5R). One-subject-leave-out was used as validation of classification performance. The evaluation metrics used as an indicator in the successful performance of the method used were accuracy, precision, recall.
Based on the results, the SVM method without optimization obtained average accuracy of 82.60 %. Whereas the SVM optimized with grid search gained average accuracy of 85.46 %, a precision of 84.05 % and a recall of 85.44 %, respectively. Overall, the proposed model, SVM optimized with grid search, can be concluded to have succeeded in improving the performance of machine learning algorithms.
Keywords: ECG, SVM, Grid Search, Sleep Stages, Classification.