首页 关于本刊 编 委 会 期刊动态 作者中心 审者中心 读者中心 下载中心 联系我们 English
 自动化学报  2018, Vol. 44 Issue (10): 1913-1920 PDF

1. 中国海洋大学信息科学与工程学院 青岛 266100;
2. 山东理工大学计算机科学与技术学院 淄博 255000

A Method for ECG Classification Using Deep Learning and Fuzzy C-means
WU Zhi-Yong1,2, DING Xiang-Qian1, XU Xiao-Wei1, JU Chuan-Xiang2
1. College of Information Science and Engineering, Ocean University of China, Qingdao 266100;
2. School of Computer Science and Technology, Shandong University of Technology, Zibo 255000
Manuscript received : July 26, 2017, accepted: December 6, 2017.
Foundation Item: Supported by National Key Research and Development Program of China (2016YFB1001103)
Corresponding author. WU Zhi-Yong  Ph. D. candidate at the College of Information Science and Engineering, Ocean University of China. Lecturer at the School of Computer Science and Technology, Shandong University of Technology. His main research interest is intelligent computing. Corresponding author of this paper.
Abstract: In the classification system for longtime and massive ECG signals, ECG diagnosis is time-consuming, laborious and costly. It is difficult to extract signal features because of the complex ECG morphology. The diagnosis model has low adaptability and accuracy. To solve the above problem, a novel method for ECG classification using deep learning and fuzzy C-means is proposed. The method includes four steps:ECG signal preprocessing, heartbeat segmentation and sampling point unification, ECG feature deep learning, fuzzy C-means classification. The structure and algorithm of fuzzy C-means deep belief networks (FCMDBN) are shown in the paper. The method is validated on the well-known MIT-BIH arrhythmia database. Experiment results show that the approach achieves higher adaptability and accuracy than traditional hand-designed methods on classification of ECG signals.
Key words: ECG classification     deep learning     fuzzy C-means     deep belief networks (DBNs)

 图 1 心电信号自动分类系统流程 Figure 1 The system flow of ECG classification

1 提出的方法

 图 2 基于深度学习和模糊C均值的心电信号分类技术流程 Figure 2 The process of ECG classification using deep learning and fuzzy C-means
1.1 心电信号降噪预处理

1.2 心电信号分段与采样点统一化

1.3 无监督心跳特征学习

1.4 心电信号模糊分类

2 模糊C均值深度信念网络模型

 $y_i =\left\{ {{\begin{array}{*{20}c} 1, \\ 0, \\ \end{array}}{\begin{array}{*{20}c} \\ \\ \end{array} }{\begin{array}{*{20}c} x~\text{属于}~i~\text{类} \\ x~\text{不属于}~i~\text{类} \\ \end{array} }} \right.$ (1)

 图 3 模糊C均值深度网络结构 Figure 3 Fuzzy C-means deep network structure
2.1 深度网络DBN构建

 $E(v, h;\theta _1 )= \sum\limits_{i=1}^n \frac{{(v_i -a_i )^2}} {2\sigma _i^2 } -\sum\limits_{j=1}^m {b_j h_j } -\\ \sum\limits_{i=1}^n \sum\limits_{j=1}^m \frac{{v_i } }{\sigma _i }h_j w_{ij}$ (2)
 $E(v, h;\theta _2 )= \sum\limits_{i=1}^n \frac{{(v_i -a_i )^2} }{2\sigma _i^2 } -\sum\limits_{j=1}^m {b_j h_j } -\\ \sum\limits_{i=1}^n \sum\limits_{j=1}^m \frac{{v_i } }{\sigma _i }h_j w_{ij}$ (3)

 $\Delta w_{ij} \approx \varepsilon \left(\left\langle \dfrac{v_i }{\sigma _i^2 }h_j \right\rangle_{data} -\left\langle \dfrac{v_i }{\sigma _i^2 }h_j \right\rangle_{\rm model} \right) \\ \Delta a_i \approx \varepsilon \left(\left\langle \dfrac{v_i } {\sigma _i^2 }\right\rangle_{data} -\left\langle \dfrac{v_i }{\sigma _i^2 }\right\rangle_{\rm model}\right ) \\ \Delta b_j \approx \varepsilon \left(\left\langle h_j \right\rangle_{data} -\left\langle h_j \right\rangle_{\rm model} \right)$ (8)
 $\Delta w_{ij} \approx \varepsilon (\langle v_i h_j \rangle_{data} -\langle v_i h_j \rangle_{\rm model} ) \\ \Delta a_i \approx \varepsilon (\langle v_i \rangle_{data} -\langle v_i \rangle_{\rm model} ) \\ \Delta b_j \approx \varepsilon (\langle h_j \rangle_{data} -\langle h_j \rangle_{\rm model} )$ (9)

 $h^t=\delta (b^t+\sum {h^{t-1}w^t} )$ (10)

DBN无监督训练结束后, 使用$L$条有标签的心电信号样本通过梯度下降和反馈传播算法对参数进行优化微调以增强模型的分类性能, 此优化问题可用式(11)表达:

 $\theta ^{\ast }{=}\arg \min \sum\limits_{i=1}^L {\sum\limits_{j=1}^C {\exp (-\delta ^i(b_j^t +\sum {h_j^{t-1} w_j^t } )y_j^i )} }$ (11)
2.2 模糊C均值分类

$H=\{h_1, h_2, \cdots, h_L\}$是通过深度DBN模型抽取的对应$L$条心电信号样本的抽象特征向量, 若抽象特征维度为$p$, 则$H$可用式(12)表示.

 $H=\left[{{\begin{array}{*{20}c} {h_{1, 1} } & {h_{1, 2} } & {\cdots} & {h_{1, p} } \\ {h_{2, 1} } & {h_{2, 2} } & {\cdots} & {h_{2, p} } \\ \vdots &\vdots & {\ddots} & \vdots \\ {h_{L, 1} } & {h_{L, 2} } & {\cdots} & {h_{L, p} } \\ \end{array} }} \right]$ (12)

 $J(H;U, V)=\sum\limits_{c=1}^C {\sum\limits_{l=1}^L {(u_{c, l} )^m(d_{c, l} )^2} }$ (13)

 $U=(u_{c, l} )_{C\times L} =\left[{{\begin{array}{*{20}c} {u_{1, 1} } & {u_{1, 2} } & {\cdots} & {u_{1, L} } \\ {u_{2, 1} } & {u_{2, 2} } & {\cdots} & {u_{2, L} } \\ {\vdots} & {\vdots} & {\ddots} & {\vdots} \\ {u_{C, 1} } & {u_{C, 2} } & {\cdots} & {u_{C, L} } \\ \end{array} }} \right]$ (14)
 $\left\{{{\begin{array}{*{20}c} {0\le u_{c, l} \le 1, \qquad 1\le c\le C, 1\le l\le L} \\ {\sum\limits_{c=1}^C {u_{c, l} =1, \qquad 1\le l\le L} } \\ \end{array} }} \right.$ (15)
 $v_c =\frac{\sum\limits_{l=1}^L {(u_{c, l} )^mh_l } }{\sum\limits_{l=1}^L {(u_{c, l} )^m} }, \qquad 1\le c\le C$ (16)
2.3 模糊C均值深度信念网络算法FCMDBN

FCMDBN模型经过以下两个构建过程后可对心电信号类型进行分类:

1) 利用无标签和有标签的心电信号采样数据训练DBN模型, 获取心电信号类型的FCM划分矩阵.首先, 利用无标签采用数据对DBN模型进行逐层贪婪无监督学习和有标签采样数据对DBN模型进行梯度下降监督学习.然后, 依据获取的高层抽象心电信号特征向量数据计算每类心电信号的聚类中心, 构建划分矩阵.

2) 优化微调FCMDBN模型.结合反向回馈算法和FCMDBN模糊分类功能, 利用有标签的心电信号采样数据进行逐层贪婪学习和梯度下降学习后对FCMDBN模型参数进行调整优化.

FCMDBN参数:

for $k=1$; $k < n$ do

if $k==1$ do

设置RBM可见单元Gaussian类型;

else if $k==n-1$ do

设置RBM隐藏单元为Gaussian类型;

else do

设置RBM隐藏单元Binary类型;

end

for $e=1$; $e\leq E$ do

for $l=1$; $l\leq L$ do

if $k==1$ do

根据式(3)和(4)分别计算GBRBM隐藏单元和可见单元的条件概率;

根据式(7)计算更新GBRBM连接权重和隐藏单元和可见单元偏置;

else do

if $k==n-1$ do

设置激活函数为线性函数

else do

设置激活函数为逻辑回归函数

end

根据式(5)和(6)分别计算BBRBM隐藏单元和可见单元的条件概率;

根据式(8)计算更新BBRBM连接权重和隐藏单元和可见单元偏置;

end

end

end

end

再次基于心电信号ds_training训练样本对DBN进行逐层贪婪无监督学习.

再次根据式(10)对训练的DBN进行有监督学习, 采用反向回馈算法调整DBN参数.

3 实验与结果分析 3.1 实验数据

 图 4 5类心律波形图 Figure 4 Five types of cardiac rhythms graph

3.2 实验与结果分析

 图 5 心律特征值分布范围 Figure 5 Distribution range of cardiac rhythms features value

 图 6 随机样本与各类心率中心点欧氏距离 Figure 6 Euclidean distance between random sample and\\ the center point of heart rate

 $Se=\frac{TP}{TP+FN}$ (17)
 $PPV=\frac{TP}{FP+TP}$ (18)
 $TCA=\frac{TP+TN}{TP+FP+FN+TN}$ (19)

4 结论

 1 World Health Organization. Cardiovascular diseases[Online], Available: http://www.who.int/mediacentre/factsheets/fs317/en/, May, 2017. 2 Waktare J E P, Malik M. Holter, loop recorder, and event counter capabilities of implanted devices. Pacing and Clinical Electrophysiology, 1997, 20(10): 2658-2669. DOI:10.1111/pace.1997.20.issue-10 3 de Chazal P, O'Dwyer M, Reilly R B. Automatic classification of heartbeats using ECG morphology and heartbeat interval features. IEEE Transactions on Biomedical Engineering, 2004, 51(7): 1196-1206. DOI:10.1109/TBME.2004.827359 4 Pan J P, Tompkins W J. A real-time QRS detection algorithm. IEEE Transactions on Biomedical Engineering, 1985, BME-32(3): 230-236. DOI:10.1109/TBME.1985.325532 5 de Chazal P, Reilly R B. A patient-adapting heartbeat classifier using ECG morphology and heartbeat interval features. IEEE Transactions on Biomedical Engineering, 2006, 53(12): 2535-2543. DOI:10.1109/TBME.2006.883802 6 Martis R J, Acharya U R, Min L C. ECG beat classification using PCA, LDA, ICA and discrete wavelet transform. Biomedical Signal Processing and Control, 2013, 8(5): 437-448. DOI:10.1016/j.bspc.2013.01.005 7 Kampouraki A, Manis G, Nikou C. Heartbeat time series classification with support vector machines. IEEE Transactions on Information Technology in Biomedicine, 2009, 13(4): 512-518. DOI:10.1109/TITB.2008.2003323 8 Rodríguez R, Mexicano A, Bila J, Cervantes S, Ponce R. Feature extraction of electrocardiogram signals by applying adaptive threshold and principal component analysis. Journal of Applied Research and Technology, 2015, 13(2): 261-269. DOI:10.1016/j.jart.2015.06.008 9 Ceylan R, Özbay Y. Comparison of FCM, PCA and WT techniques for classification ECG arrhythmias using artificial neural network. Expert Systems with Applications, 2007, 33(2): 286-295. DOI:10.1016/j.eswa.2006.05.014 10 da S Luz E J, Nunes T M, de Albuquerque V H C, Papa J P, Menotti D. ECG arrhythmia classification based on optimum-path forest. Expert Systems with Applications, 2013, 40(9): 3561-3573. DOI:10.1016/j.eswa.2012.12.063 11 Dilmac S, Korurek M. ECG heart beat classification method based on modified ABC algorithm. Applied Soft Computing, 2015, 36: 641-655. DOI:10.1016/j.asoc.2015.07.010 12 Yeh Y C, Lin H J. Cardiac arrhythmia diagnosis method using fuzzy C-Means algorithm on ECG signals. In: Proceedings of the 2010 International Symposium on Computer, Communication, Control and Automation (3CA). Tainan, China: IEEE, 2010. 272-275. 13 Hayat M, Bennamoun M, An S J. Deep reconstruction models for image set classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(4): 713-727. DOI:10.1109/TPAMI.2014.2353635 14 Graves A, Mohamed A R, Hinton G. Speech recognition with deep recurrent neural networks. In: Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). Vancouver, BC, Canada: IEEE, 2013. 15 Al Rahhal M M, Bazi Y, AlHichri H, Alajlan N, Melgani F, Yager R R. Deep learning approach for active classification of electrocardiogram signals. Information Sciences, 2016, 345: 340-354. DOI:10.1016/j.ins.2016.01.082 16 Hinton G E, Osindero S, Teh Y W. A fast learning algorithm for deep belief nets. Neural Computation, 2006, 18(7): 1527-1554. DOI:10.1162/neco.2006.18.7.1527 17 Wang Y S, Yao H X, Zhao S C. Auto-encoder based dimensionality reduction. Neurocomputing, 2016, 184: 232-242. DOI:10.1016/j.neucom.2015.08.104 18 Schmidhuber J. Deep learning in neural networks:an overview. Neural Networks, 2015, 61: 85-117. DOI:10.1016/j.neunet.2014.09.003 19 Kiranyaz S, Ince T, Gabbouj M. Real-time patient-specific ECG classification by 1-D convolutional neural networks. IEEE Transactions on Biomedical Engineering, 2016, 63(3): 664-675. DOI:10.1109/TBME.2015.2468589 20 Yan Y, Qin X B, Wu Y G, Zhang N N, Fan J P, Wang L. A restricted Boltzmann machine based two-lead electrocardiography classification. In: Proceedings of the 2015 IEEE 12th International Conference on Wearable and Implantable Body Sensor Networks (BSN). Cambridge, MA, USA: IEEE, 2015. 1-9 21 Meng H H, Zhang Y. Classification of electrocardiogram signals with deep belief networks. In: Proceedings of the 2014 IEEE 17th International Conference on Computational Science and Engineering (CSE). Chengdu, China: IEEE, 2014. 22 Özbay Y, Ceylan R, Karlik B. Integration of type-2 fuzzy clustering and wavelet transform in a neural network based ECG classifier. Expert Systems with Applications, 2011, 38(1): 1004-1010. 23 Yeh Y C, Wang W J, Chiou C W. A novel fuzzy c-means method for classifying heartbeat cases from ECG signals. Measurement, 2010, 43(10): 1542-1555. DOI:10.1016/j.measurement.2010.08.019 24 Sutskever I, Hinton G E. Learning multilevel distributed representations for high-dimensional sequences. Journal of Machine Learning Research, 2007, 2: 548-555. 25 Memisevic R, Hinton G. Unsupervised learning of image transformations. In: Proceedings of the 2007 IEEE Conference on Computer Vision and Pattern Recognition. Minneapolis, MN, USA: IEEE, 2007. 26 Bengio Y, Lamblin P, Popovici D, Larochelle H. Greedy layer-wise training of deep networks. In: Proceedings of the 19th International Conference on Neural Information Processing Systems. Cambridge, MA, USA: MIT Press, 2006. 153-160 27 Hüsken M, Stagge P. Recurrent neural networks for time series classification. Neurocomputing, 2003, 50: 223-235. DOI:10.1016/S0925-2312(01)00706-8 28 Polat K. Classification of Parkinson's disease using feature weighting method on the basis of fuzzy C-means clustering. International Journal of Systems Science, 2012, 43(4): 597-609. DOI:10.1080/00207721.2011.581395 29 Hwang S H, Kim D, Kang T K, Park G T. Medical diagnosis system of breast cancer using FCM based parallel neural networks. In: Proceedings of ICIC 2007: Advanced Intelligent Computing Theories and Applications with Aspects of Artificial Intelligence. Berlin Heidelberg: Springer, 2007. 712-719 30 Ekong V E, Onibere E A, Imianvan. Fuzzy cluster means system for the diagnosis of liver diseases. Journal of Computer Science & Technology, 2011, 2(3): 205-209. 31 Meau Y P, Ibrahim F, Narainasamy S A L, Omar R. Intelligent classification of electrocardiogram (ECG) signal using extended Kalman Filter (EKF) based neuro fuzzy system. Computer Methods and Programs in Biomedicine, 2006, 82(2): 157-168. DOI:10.1016/j.cmpb.2006.03.003 32 Özbay Y, Ceylan R, Karlik B. A fuzzy clustering neural network architecture for classification of ECG arrhythmias. Computers in Biology and Medicine, 2006, 36(4): 376-388. 33 Dunn J C. A fuzzy relative of the ISODATA process and its use in detecting compact well-separated clusters. Journal of Cybernetics, 1973, 3(3): 32-57. DOI:10.1080/01969727308546046 34 Bezdek J C. Pattern Recognition with Fuzzy Objective Function Algorithms. New York: Springer, 1981. 203-239 35 Hinton G E. Training products of experts by minimizing contrastive divergence. Neural Computation, 2002, 14(8): 1771-1800. DOI:10.1162/089976602760128018 36 Jekova I, Bortolan G, Christov I. Assessment and comparison of different methods for heartbeat classification. Medical Engineering & Physics, 2008, 30(2): 248-257. 37 Dokur Z, Ölmez T. ECG beat classification by a novel hybrid neural network. Computer Methods and Programs in Biomedicine, 2001, 66(2-3): 167-181. DOI:10.1016/S0169-2607(00)00133-4