Vol.123, No.1, 2020, pp.401-426, doi:10.32604/cmes.2020.08731
OPEN ACCESS
ARTICLE
Automatic Sleep Staging Algorithm Based on Random Forest and Hidden Markov Model
  • Junbiao Liu1, 6, Duanpo Wu2, 3, Zimeng Wang2, Xinyu Jin1, *, Fang Dong4, Lurong Jiang5, Chenyi Cai6
1 College of Information Science & Electronic Engineering, Zhejiang University, Hangzhou, China.
2 School of Communication Engineering, Hangzhou Dianzi University, Hangzhou, China.
3 Zhejiang Provincial Key Laboratory of Information Processing, Communication and Networking, Hangzhou, China.
4 College of Information and Electric Engineering, Zhejiang University City College, Hangzhou, China.
5 School of Information Science and Technology, Zhejiang Sci-Tech University, Hangzhou, China.
6 Hangzhou Neuro Science and Technology Co., Ltd., Hangzhou, China.
∗ Corresponding Author: Xinyu Jin. Email: jinxy@zju.edu.cn.
(This article belongs to this Special Issue: Computer Methods in Bio-mechanics and Biomedical Engineering)
Received 01 October 2019; Accepted 08 November 2019; Issue published 01 April 2020
Abstract
In the field of medical informatics, sleep staging is a challenging and timeconsuming task undertaken by sleep experts. According to the new standard of the American Academy of Sleep Medicine (AASM), the stages of sleep are divided into wakefulness (W), rapid eye movement (REM) and non-rapid eye movement (NREM) which includes three sleep stages (N1, N2 and N3) that describe the depth of sleep. This study aims to establish an automatic sleep staging algorithm based on the improved weighted random forest (WRF) and Hidden Markov Model (HMM) using only the features extracted from double-channel EEG signals. The WRF classification model focuses on reducing the bias of the imbalance data, while the HMM model focuses on improving the detection rate of sleep staging through the relationship between adjacent sleep stages. In particular, the improved weighted RF classification model can increase the recognition rate of the N1 stage. In addition, the method of removing features with low variance is used to select meaningful and contributing feature parameters for model training. This is an innovative content of this paper. The sleep EEG data are first segmented into 30 s epochs, and the feature parameters of the epoch data are extracted from the double-channel by applying continuous wavelet packet transform (WPT). Each epoch is then segmented into 29 subepochs of 2 s long with 1 s overlap, and the frequency domain features and statistical features of each subepoch are extracted. The performance of the proposed method is tested by evaluating the accuracy (AC), Kappa coefficient, Recall (R), Precision (P) and F1-score (F1). In the Sleep-EDF database, the overall AC and Kappa coefficient obtained by WRF are 93.20% and 0.890, respectively using the subject-non-independent test. In the 10 sc* and 10 st* Sleep-EDF Expanded database, the overall AC and Kappa coefficient obtained by proposed method are 91.97% and 0.874, respectively using the subject-independent test. The best AC and Kappa coefficient of single subject can reach 96.3% and 0.912, respectively. Experimental results show that the performance of the proposed method is competitive with the most current methods and results, and the recognition rate of N1 stage is significantly improved.
Keywords
Sleep staging, wavelet packet transform, random forest, HMM.
Cite This Article
Liu, J., Wu, D., Wang, Z., Jin, X., Dong, F. et al. (2020). Automatic Sleep Staging Algorithm Based on Random Forest and Hidden Markov Model. CMES-Computer Modeling in Engineering & Sciences, 123(1), 401–426.