簡易檢索 / 詳目顯示

研究生: 鍾愛
Chung, Ai
論文名稱: 基於卷積式類神經網路並採用滑動視窗之資料過取樣策略的睡眠階層自動辨識演算法開發
Development of an Oversampling Framework based on Sliding Window Method for CNN-based Sleep Recognition Algorithm via PSG Spectrogram Fusion
指導教授: 林哲偉
Lin, Che-Wei
學位類別: 碩士
Master
系所名稱: 工學院 - 生物醫學工程學系
Department of BioMedical Engineering
論文出版年: 2020
畢業學年度: 108
語文別: 英文
論文頁數: 78
中文關鍵詞: 睡眠階層卷積神經網路時頻轉換不平衡資料集滑動視窗
外文關鍵詞: Sleep stages, convolutional neural network, time-frequency transformation, imbalanced dataset, sliding window, 20-fold, leave-one-subject-out
相關次數: 點閱:108下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本研究提出了一種基於卷積式類神經網路並採用滑動視窗之資料過取樣策略的睡眠階層自動辨識演算法。我們採用連續小波變換(Continuous wavelet transform, CWT)作為特徵變換方法,從而將原始的腦波(Electroencephalography, EEG)和眼動(Electrooculography, EOG)訊號轉換為時域-頻域的頻譜圖。為了解決睡眠數據集中的資料不平衡問題,我們採用滑動視窗法 (Sliding window)作為數據擴充方法,使每個階段的樣本數更加平均。我們將包含多通道和多個Epoch的腦波時頻圖作為三種基於卷積式類神經網絡 (Convolutional neural network, CNN)的分類器的輸入,包括使用AlexNet提取特徵的SVM分類器,AlexNet和ResNet18。這些模型從時頻圖中學習特徵,並能夠將輸入數據分為W,N1,N2,N3和R的5個睡眠階段,分類的結果透過20摺交叉驗證 (20-fold cross-validation)和留一交叉驗證(leave-one-subject-out cross-validation, LOSOCV)來驗證準確率的可靠性。本研究與國立成功大學醫院的睡眠醫學中心 (Sleep Center of National Cheng Kung University Hospital, NCKUH)合作,並因此獲得了臨床的睡眠資料。我們共有三個睡眠資料庫,包括NCKUH 50 subjects資料庫,PhysioNet資料庫和NCKUH 29 subjects資料庫。前兩個資料庫採用了20摺交叉驗證,NCKUH 29 subjects資料庫則使用了LOSOCV,以進一步驗證結果的可靠性。這29位受試者從NCKUH 50 subjects資料庫中挑出,為健康人或輕度睡眠呼吸中止症 (Sleep apnea)患者。使用20摺交叉驗證的情況下,NCKUH 50 subjects資料庫使用ResNet18時有最高的平均準確率,達到95.81%。最高的N1準確率為98.53%,出現在使用AlexNet的PhysioNet數據庫中。在使用LOSOCV的情況下,AlexNet的表現最佳,最高的平均準確率可達78.92%,Cohen’s kappa係數為0.72,並且有最高的N1準確率,56.47%。結果顯示,滑動窗口法提高了每個階段的準確率,尤其是N1階段。

    This research proposed an oversampling framework based on a sliding window method for CNN-based sleep recognition algorithm via PSG spectrogram fusion. Continuous wavelet transform (CWT) was adopted as the feature transformation method so that original EEG and EOG signals were transferred into time-frequency spectrograms. In order to solve the data imbalance problem in sleep dataset, we utilized sliding window method as the data augmentation method, making sample number in each stage more average. We took multi-channel and multi-epoch images as the input of three CNN-based classifiers, including AlexNet extraction with SVM, AlexNet, and ResNet18. The models learned the features form the spectrograms and were able to classify input data into 5 sleep stages, W, N1, N2, N3, and R. The classification results were validated by 20-fold cross-validation and leave-one-subject-out cross-validation (LOSOCV). This study collaborated with the Sleep Center of National Cheng Kung University Hospital (NCKUH) and thus obtained the clinical sleep data. There were three database in this study, including NCKUH 50 subjects database, PhysioNet database, and NCKUH 29 subjects database. The first two databases adapted the 20-fold cross-validation and NCKUH 29 subjects database adapted the LOSOCV in order to verify the reliability of our algorithm. The 29 subjects with health or slight sleep apnea were selected from the NCKUH 50 subjects database. With 20-fold cross-validation, the average accuracy reached 95.81% with ResNet18 in NCKUH 50 subjects database. The highest N1 accuracy was 98.53% occurred in PhysioNet database with AlexNet. With LOSOCV, the average accuracy could reach 78.92% with AlexNet, and the Cohen’s kappa coefficient was 0.72. The highest N1 accuracy was 56.47%. The results showed that the sliding window method improved the accuracy in each stage, especially in N1 stage.

    摘 要 ii Development of an Oversampling Framework based on Sliding Window Method for CNN-based Sleep Recognition Algorithm via PSG Spectrogram Fusion iv Abstract iv 誌謝 vi Table of Contents vii List of Tables x List of Figures xi Chapter 1 Introduction 1 1.1 Introduction 1 1.2 Literature review 3 1.2.1 Sleep Stage Classification and Under-Sampling 3 1.2.2 Sleep Stage Classification and Over-Sampling 5 1.2.3 Sleep Stage Classification using Machine Learning Algorithm 6 1.2.4 Sleep Stage Classification using Convolutional Neural Network 8 1.3 Motivation 14 1.4 Organization of This Thesis 14 Chapter 2 An Oversampling Framework based on Sliding Window Method for CNN-based Sleep Recognition Algorithm 15 2.1 Algorithm Architecture 15 2.2 PSG Channel Selection 16 2.2.1 NCKUH Database 17 2.2.2 PhysioNet Database 17 2.3 Signal Preprocessing 18 2.4 Time Windowing 18 2.4.1 Sliding Window 18 2.5 Time-Frequency Transformation 22 2.5.1 Continuous Wavelet Transform (CWT) 23 2.5.2 Application in this study 23 2.5.3 Multi-Channel and Multi-Epoch EEG Spectrogram 29 2.6 Convolutional Neural Network (CNN) 30 2.6.1 AlexNet 30 2.6.2 AlexNet Feature Extraction + Support Vector Machine (SVM) 31 2.7 Cross-Validation 32 2.7.1 ResNet-18 32 2.7.2 K-fold Cross-Validation 33 2.7.3 Leave-One-Subject-Out Cross-Validation 34 2.7.4 Confusion Matrix 34 Chapter 3 Experimental result 36 3.1 Data Source 36 3.1.1 NCKUH 50 subjects Database 36 3.1.2 PhysioNet Database 36 3.1.3 NCKUH 29 subjects Database 37 3.1.4 Sample Number 37 3.1.4.1 Fewer Samples in Stage W 42 3.1.4.2 Fewer Samples in Stage N3 42 3.2 Experimental Result 42 3.2.1 Classification Result of NCKUH 50 subjects Database 42 3.2.2 Confusion Matrices of NCKUH 50 subjects Database 45 3.2.2.1 Original Dataset 45 3.2.2.2 Sliding Window Dataset 47 3.2.3 Classification Result of PhysioNet Database 48 3.2.4 Confusion Matrices of PhysioNet Database 51 3.2.4.1 Original Dataset 51 3.2.4.2 Sliding Window Dataset 52 3.2.5 Classification Result of NCKUH 29 subjects Database 53 3.2.6 Confusion Matrices of NCKUH 29 Subjects Database 60 3.2.6.1 Original Dataset 60 3.2.6.2 Sliding Window Dataset 61 Chapter 4 Discussions and Conclusions 63 4.1 Discussions 63 4.1.1 Deep Learning for Sleep Stage Classification 63 4.1.2 Sliding Window for Sleep Stage Classification 64 4.1.3 Reduced Accuracy in N2 stage 66 4.1.4 Limitations of the Proposed Algotrithm 67 4.1.5 Comparison with Existing Research 68 4.2 Conclusions and Future works 70 References 71

    [1] A. R. Hassan and M. I. H. Bhuiyan, “Automated identification of sleep states from EEG signals by means of ensemble empirical mode decomposition and random under-sampling boosting,” Computer methods and programs in biomedicine, vol. 140, pp. 201-210, 2017.
    [2] M. Rahman, M. bhuiyan, and A. Hassan, “Sleep stage classification using single-channel EOG,” Computer in Biology and Medicine, vol.102, Nov., pp.211-220, 2018
    [3] P. Memar and F. Faradji, “A Novel Multi-Class EEG-Based Sleep Stage Classification System,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 26, no. 1, Jan., pp. 84-95, 2018.
    [4] I. N. Yulita, M. I. Fanany, and A. M. Arymurthy, “Fast convolutional method for automatic sleep stage classification,” Healthcare informatics research, vol. 24, no. 3, pp, 170-178, 2018.
    [5] A. R. Hassan and M. I. H. Bhuiyan, “Automated identification of sleep states from EEG signals by means of ensemble empirical mode decomposition and random under-sampling boosting,” Computer methods and programs in biomedicine, vol. 140, pp. 201-210, 2017.
    [6] H. Dong, A. Supratak, W. Pan, C. Wu, P. M. Matthews, and Y. Guo,” Mixed neural network approach for temporal sleep stage classification,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 26, no. 2, pp. 324-333, 2017.
    [7] R. Sharma, R. B. Pachori and A. Upadhyay, ”Automatic sleep stages classification based on iterative filtering of electroencephalogram signals,” Neural Computing and Applications, vol. 28, no. 2, pp. 2959-2978, 2017.
    [8] A. Supratak, H. Dong, C. Wu, and Y. Guo, “DeepSleepNet: A model for automatic sleep stage scoring based on raw single-channel EEG,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 25, no. 11, Nov. 2017.
    [9] M. Sharma, D. Goyal, Achuth, P.V., and U. Rajendra Acharya, “An accurate sleep stages classification system using a new class of optimally time-frequency localized three-band wavelet filter bank,” Computers in Biology and Medicine, vol. 98, July, pp. 58-75, 2018.
    [10] G. Zhu, Y. Li, and P. Wen, “Analysis and Classification of Sleep Stages Based on Difference Visibility Graphs From a Single-Channel EEG Signal,” IEEE Journal of Biomedical and Health Informatics, vol. 18, no. 6, Feb., pp. 1813-1821, 2014.
    [11] T. Lajnef, S. Chaibi, P. Ruby, P. E. Aguera, J. B. Eichenlaub, M. Samet, A. Kachouri, and K. Jerbi, “Learning machines and sleeping brains: Automatic sleep stage classification using decision-tree multi-class support vector machines,” Journal of Neuroscience Methods, vol. 250, Jul., pp. 94-105, 2015.
    [12] E. Alickovic and A. Subasi, “Ensemble SVM Method for Automatic Sleep Stage Classification,” IEEE Transactions on Instrumentation and Measurement, vol. 67, no. 6, Feb. 2018.
    [13] M. Diykh and Y. Li, “Complex networks approach for EEG signal sleep stages classification,” Expert Systems with Applications, vol. 63, Nov., pp. 241-248, 2016.
    [14] V. Bajaj and R. B. Pachori, “Automatic classification of sleep stages based on the time-frequency image of EEG signals,” Computer Methods and Programs in Biomedicine, vol. 112, no. 3, Dec., pp. 320-328, 2013.
    [15] S. Crisler, M. J. Morrissey, A. M. Anch, and D. W. Barnett, “Sleep-stage scoring in the rat using a support vector machine,” Journal of Neuroscience Methods, vol. 168, no. 2, Mar., pp. 524-534, 2008.
    [16] Khald A. I. Aboalayon, M. Faezipour, W. S. Almuhammadi, and S. Moslehpour, “Sleep Stage Classification Using EEG Signal Analysis: A Comprehensive Survey and New Investigation,” Entropy, vol. 18, no. 9, Aug., pp. 1-31, 2016.
    [17] J. Zhang, Y. Wu, J. Bai, and F. Chen, “Automatic sleep stage classification based on sparse deep belief net and combination of multiple classifiers,” Transactions of the Institute of Measurement and Control, vol. 38, no. 4, Jun., pp. 431-451, 2015.
    [18] M. Diykh, Y. Li, and P. Wen, “EEG Sleep Stages Classification Based on Time Domain Features and Structural Graph Similarity,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 24, no. 11, Apr., pp. 1159-1168, 2016.
    [19] T. Willemen, D. V. Deun, V. Verhaert, M. Vandekerckhove, V. Exadaktylos, J. Verbraecken, S. V. Huffel, B. Haex, and J. V. Sloten, “An Evaluation of Cardiorespiratory and Movement Features With Respect to Sleep-Stage Classification,” IEEE Journal of Biomedical and Health Informatics, vol. 18, no. 2, Sept., pp.661-669, 2013.
    [20] S. Jirayucharoensak, S. Pan-Ngum, and P. Israsena., “EEG-Based Emotion Recognition Using Deep Learning Network with Principal Component Based Covariate Shift Adaptation,” The Scientific World Journal, vol. 2014, 2014.
    [21] M. Langkvist, L. Karlsson, and A. Loutf, “Sleep Stage Classification Using Unsupervised Feature Learning,” Advances in Artificial Neural Systems, pp. 9, 2012.

    [22] S.Chambon, M. N. Galtier, P. J. Arnal, G. Wainrib, and A. Gramfort, “A Deep Learning Architecture for Temporal Sleep Stage Classification Using Multivariate and Multimodal Time Series,” IEEE Transactions on Neural Systems and Rehabilitation Engineering, vol. 26, No. 4, Apr., pp. 758 - 769, 2018.
    [23] S. Biswal, J. Kulas, H. Sun, B. Goparaju, M.B. Westover, M.T. Bianchi, and J. Sun, “SLEEPNET: Automated Sleep Staging System via Deep Learning,” arXiv:1707.08262, Jul. 2017.
    [24] X. Zhang, W. Kou, I. Eric, C. Chang, H. Gao, Y. Fan, &Y. Xu, “Sleep stage classification based on multi-level feature learning and recurrent neural networks via wearable device,” Computers in biology and medicine, vol. 103, pp. 71-81, 2018.
    [25] Amiya Patanaik, Ju Lynn Ong, Joshua J Gooley, Sonia Ancoli-Israel & Michael W L Chee, “An end-to-end framework for real-time automatic sleep stage classification,” Sleep, vol. 41, issue 5, 2018.
    [26] T. Sousa, A. Cruz, S. Khalighi, G. Pires, and U. Nunes, “A two-step automatic sleep stage classification method with dubious range detection,” Computers in Biology and Medicine, vol. 59, Jan., pp. 42–53, 2015.
    [27] S. Mousavi, F. Afghah, and U. R. Acharya, “SleepEEGNet: Automated sleep stage scoring with sequence to sequence deep learning approach,” PLOS ONE, 2019
    [28] Acharya, U.R., Chua, E.C.P., Chua, K.C., Min, L.C. and Tamura, T., “Analysis and automatic identification of sleep stages using higher order spectra,” International Journal of neural systems, vol. 20, pp.509-521, 2010.
    [29] I. N. Yulita, M. I. Fanany, and A. M. Arymuthy, “Bi-directional Long Short-Term Memory using Quantized data of Deep Belief Networks for Sleep Stage Classification,” Procedia Computer Science, 116, pp. 530–538, 2017.
    [30] O. Tsinalis, P. M. Matthews, & Y. Guo, “Automatic sleep stage scoring using time-frequency analysis and stacked sparse autoencoders,” Annals of biomedical engineering, vol. 44 no. 5, pp. 1587-1597, 2016.
    [31] O. Tsinalis, P. M. Matthews, Y. Guo & S. Zafeiriou, “Automatic sleep stage scoring with single-channel EEG using convolutional neural networks,” arXiv:1610.01683, Oct. 2016.
    [32] J. Zhang and Y. Wu, “Complex-valued unsupervised convolutional neural networks for sleep stage classification,” Computer Methods and Programs in Biomedicine, vol. 164, Jul., pp. 181–191, 2018.
    [33] B Kemp, AH Zwinderman, B Tuk, HAC Kamphuisen, and JJL Oberyé, “Analysis of a sleep-dependent neuronal feedback loop: the slow-wave microcontinuity of the EEG,” IEEE Transactions on Biomedical Engineering, vol. 47, issue 9, pp. 1185-1194, 2000.
    [34] Richard B. Berry, Rita Brooks, Charlene E. Gamaldo, Susan M. Harding, Robin M. Lloyd, Carole L. Marcus, and Bradley V. Vaughu, The AASM Manual for the Scoring of Sleep and Associated Events v2.3, 2017
    [35] Narayan P. Subramaniyam, “Effect of EEG Reference Choice on Outcomes,” 2019. [Online]. Available: https://reurl.cc/k5eEen. [Accessed Jan. 6, 2020].
    [36] 劉勝義, “正常睡眠與睡眠障礙,” in 睡眠醫學實務, Taiwan, 合記圖書出版社, 2011, ch. 3, sec. 1, pp. 30.
    [37] Yifan Zhao, Steve A. Billings, Hualiang Wei, and Ptolemaios Georgios Sarrigiannis, “Tracking time-varying causality and directionality of information flow with applications to EEG data,” Physical Review E, vol. 86, 2012.
    [38] Chetan S. Nayak and Arayamparambil C. Anilkumar, “EEG Normal Waveforms,” 2019. [Online]. Available: https://reurl.cc/8lapxR. [Accessed Jan. 6, 2020].
    [39] Manjari Tripathi, “Technical notes for digital polysomnography recording in sleep medicine practice,” Annals of Indian Academy of Neurology, vol. 11, pp. 129-138, 2008.
    [40] Taiwan Association of Mental Health Development, “[睡眠階段]你所不知道的睡眠變化--「睡眠結構圖」,” 2017. [Online]. Available: https://tamhd.org/sleep-stages/.
    [41] 盧家鋒, Class Lecture, Topic: “時頻分析-短時距傅立葉轉換、小波轉換,” 國立陽明大學, 物理治療暨輔助科技學系, Taiwan. [Online]. Available: https://reurl.cc/b6rEOE. [Accessed Jan. 6, 2020].
    [42] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks,” NIPS'12: Proceedings of the 25th International Conference on Neural Information Processing Systems, vol.1, pp. 1097-1105, 2012
    [43] MathWorks, “alexnet.” [Online]. Available: https://reurl.cc/dr3WY2. [Accessed Jan. 6, 2020].
    [44] MathWorks, “Pretrained Deep Neural Networks.” [Online]. Available: https://reurl.cc/nV3OK8. [Accessed Jan. 6, 2020].
    [45] Corinna Cortes and Vladimir N Vapnik, “Support-Vector Networks,” Machine Language, 1995.
    [46] MathWork, “ClassificationECOC.” [Online]. Available: https://reurl.cc/Gk6E8D. [Accessed Jan. 6, 2020].
    [47] MathWork, “resnet18.” [Online]. Available: https://reurl.cc/ObN4Z9. [Accessed Jan. 6, 2020].
    [48] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun, “Deep Residual Learning for Image Recognition,” 2016 IEEE Conference on Computer Vision and Pattern Recognition, 2016.
    [49] ITRead, “深度學習-深度殘差網路詳解ResNet.” [Online]. Available: https://www.itread01.com/content/1544868722.html. [Accessed Jan. 6, 2020].
    [50] 程式前沿, “Cross Validation交叉驗證.” [Online]. Available: https://reurl.cc/728pgk. [Accessed Jan. 6, 2020].
    [51] 每日頭條, “交叉驗證cross-validation《Python機器學習》之十七.” [Online]. Available: https://kknews.cc/zh-tw/code/bg2b366.html. [Accessed Jan. 6, 2020].
    [52] Wikipedia, “F1 score.” [Online]. Available: https://en.wikipedia.org/wiki/F1_score. [Accessed Jan. 6, 2020].
    [53] Boaz Shmueli, “Multi-Class Metrics Made Simple: the Kappa Score (aka Cohen’s Kappa Coefficient),” towardsdatascience.com, Dec 18, 2019. [Online]. Available: https://reurl.cc/nzmOpn. [Accessed May 11, 2020]
    [54] Sirin W. Gangstad, Kaare B. Mikkelsen, Preben Kidmose, Yousef R. Tabar, Sigge Weisdorf, Maja H. Lauritzen, Martin C. Hemmsen, Lars K. Hansen, Troels W. Kjaer, and Jonas Duun-Henriksen, “Automatic sleep stage classification based on subcutaneous EEG in patients with epilepsy,” BioMedical Engineering OnLine, Oct. 30, 2019 [Online]. Available: https://reurl.cc/AqMOZK. [Accessed May 11, 2020].
    [55] Kaare B. Mikkelsen, David Bové Villadsen, Marit Otto, and Preben Kidmose, “Automatic sleep staging using ear-EEG,” BioMedical Engineering OnLine, Sep. 19, 2017 [Online]. Available: https://reurl.cc/d0QWYy. [Accessed May 11, 2020].

    無法下載圖示 校內:2025-01-13公開
    校外:不公開
    電子論文尚未授權公開,紙本請查館藏目錄
    QR CODE