摘要
The method of using deep learning technology to realize automatic sleep staging needs a lot of data support, and its computational complexity is also high. In this paper, an automatic sleep staging method based on power spectral density (PSD) and random forest is proposed. Firstly, the PSDs of six characteristic waves (K complex wave, δ wave, θ wave, α wave, spindle wave, β wave) in electroencephalogram (EEG) signals were extracted as the classification features, and then five sleep states (W, N1, N2, N3, REM) were automatically classified by random forest classifier. The whole night sleep EEG data of healthy subjects in the Sleep-EDF database were used as experimental data. The effects of using different EEG signals (Fpz-Cz single channel, Pz-Oz single channel, Fpz-Cz + Pz-Oz dual channel), different classifiers (random forest, adaptive boost, gradient boost, Gaussian naïve Bayes, decision tree, K-nearest neighbor), and different training and test set divisions (2-fold cross-validation, 5-fold cross-validation, 10-fold cross-validation, single subject) on the classification effect were compared. The experimental results showed that the effect was the best when the input was Pz-Oz single-channel EEG signal and the random forest classifier was used, no matter how the training set and test set were transformed, the classification accuracy was above 90.79%. The overall classification accuracy, macro average F1 value, and Kappa coefficient could reach 91.94%, 73.2% and 0.845 respectively at the highest, which proved that this method was effective and not susceptible to data volume, and had good stability. Compared with the existing research, our method is more accurate and simpler, and is suitable for automation.采用深度学习技术实现睡眠自动分期计算复杂度较高,且需大量数据支撑。本文提出一种基于功率谱密度和随机森林的自动睡眠分期方法,先提取脑电信号6种特征波(K复合波、δ波、θ波、α波、纺锤波、β波)的功率谱密度作为特征,然后利用随机森林分类器实现5种睡眠状态(W、N1、N2、N3、REM)自动分类。采用Sleep-EDF数据库中健康受试者整晚睡眠脑电数据作为实验数据,对比了使用不同输入通道脑电信号(Fpz-Cz单通道、Pz-Oz单通道、Fpz-Cz + Pz-Oz双通道)、不同分类器(随机森林、自适应增强、梯度提升、高斯朴素贝叶斯、决策树、K近邻)、不同训练集与测试集划分方法(2折、5折、10折交叉验证及单个受试者)对分类效果的影响。实验结果表明,当采用Pz-Oz单通道脑电信号和随机森林分类器时效果最好,无论怎样变换训练集与测试集,分类准确率都达到90.79%以上,总体分类准确率、宏观平均F1值、Kappa系数最高分别可达到91.94%、73.2%、0.845,证明该方法是有效的,且不易受数据量影响,具有较好的稳定性。与已有研究相比,该方法分类准确率更高、实现更简单,适用于自动化。.