Arrhythmia is one of the common diseases at present.Deep learning technology can help doctors to make early diagnosis of arrhythmia.Because ECG(electrocardiograms)contains important information about whether people have heart disease,it has become an important carrier for doctors to judge heart disease.Deep learning algorithm can extract important information from ECG data,which is of great significance for the analysis of arrhythmia disease.At present,there are many models in the classification of arrhythmia diseases,but due to the imbalance of abnormal heart beat data,there are still some problems such as unsatisfactory classification effect and low accuracy.In view of the above problems,in order to improve the accuracy of disease diagnosis,this thesis uses deep learning technology to carry out the research of abnormal heart beat classification based on ECG.the main work is as follows.(1)Aiming at the problems of small amount of abnormal heart beat data,small sample characteristics and unbalanced data classification,a generative adversarial network combined with real ECG data from hospital patients is proposed.In this thesis,the generative network and discriminant network of generative adversarial network are improved.Firstly,convolutional neural network is used to extract the spatial features of heart beat data in Generative network,and then long-term and short-term memory network is used to extract the temporal features.In discriminator,the improved lenet-5 model is used to discriminate the generated heart beat data.The experimental results show that the improved generative adversarial network can improve the accuracy of generating abnormal heart beat data,and has lower loss value than other generative adversarial networks.(2)A class activation mapping function based on generative adversarial networks is constructed.This function replaces the fully connected layer with the global average pooling layer,and connect the classifier with ECG feature extracted from the global average pooling layer.The weight parameters on the classifier is summed with the feature map obtained by the global average pooling layer.The calculation result is used as the output of the class activation mapping function to focus on the areas that play an important role in the generation of ECG and the key information in the generated ECG.So the generated ECG has better interpretability.(3)A hybrid classification model based on convolutional neural network,short-term memory model and attention mechanism is designed.Convolutional neural network is used to extract the spatial features of data,long-term and short-term memory model is used to extract the temporal features of data,and attention mechanism gives different weights to the data at different sampling points.The more important the data is,the greater the corresponding weight is,and the greater the impact on the classification results is.On this basis,the real patient data and the generated data are classified by the improved model.Experimental results show that compared with other classification algorithms,the performance of this algorithm is better than other classification models. |