Electrocardiosignal classification method based on BiLSTM-Treg

文档序号:215995 发布日期:2021-11-09 浏览:7次 中文

阅读说明:本技术 一种基于BiLSTM-Treg的心电信号分类方法 (Electrocardiosignal classification method based on BiLSTM-Treg ) 是由 姚金良 李润川 彭岩 宋鲲鹏 宋洪军 周兵 王宗敏 于 2021-09-10 设计创作,主要内容包括:本发明涉及一种基于BiLSTM-Treg的心电信号分类方法,包括建立BiLSTM-Treg神经网络模型、采集心电信号、对数据进行预处理、进行心电信号的分类的步骤;本发明首先对数据进行预处理,滤除心电信号中的噪声,并将心电信号以心搏为单位划分,其次,将连续的单心搏组合成心搏段,使得心搏间的节律信息得以保留;然后进行模型的搭建与优化,最后进行心搏分类;本发明通过构建融合心搏间节律信息的时序BiLSTM-Treg神经网络模型,并利用树正则化方法进行优化,提高了神经网络模型的泛化能力,提高了心搏分类的准确率。(The invention relates to an electrocardiosignal classification method based on a BiLSTM-Treg, which comprises the steps of establishing a BiLSTM-Treg neural network model, collecting electrocardiosignals, preprocessing data and classifying the electrocardiosignals; the method comprises the steps of preprocessing data, filtering noise in electrocardiosignals, dividing the electrocardiosignals by taking heart beats as a unit, and combining continuous single heart beats into heart beat sections to keep rhythm information among the heart beats; then, building and optimizing a model, and finally classifying heart beats; according to the invention, by constructing the time sequence BilSTM-Treg neural network model fusing the internodal rhythm information and optimizing by using the tree regularization method, the generalization capability of the neural network model is improved, and the accuracy of heart beat classification is improved.)

1. A method for classifying electrocardiosignals based on BilSTM-Treg is characterized by comprising the following steps:

establishing a BiLSTM-Treg neural network model: the neural network model is obtained by taking heart beat data in an MIT-BIH arrhythmia database as a training set, forming continuous electrocardiosignals of a plurality of single heart beats into a heart beat section and training by using a tree regularized BilSTM model by taking the heart beat section as a unit;

collecting electrocardiosignals;

preprocessing data: carrying out discrete wavelet transform denoising on the electrocardiosignals by using a computer, and then dividing the denoised electrocardiosignals by taking heart beats as units;

and (3) classifying the electrocardiosignals: and inputting the denoised electrocardio data into a BiLSTM-Treg neural network model for classification by taking the heartbeat section as a unit.

2. The BilSTM-Treg-based electrocardiosignal classification method according to claim 1, characterized in that: the heart beat segment comprises 10-15 single heart beats.

3. The BilSTM-Treg-based electrocardiosignal classification method according to claim 1, characterized in that: the heart beat segment comprises 15 single heart beats.

4. The BilSTM-Treg-based electrocardiosignal classification method according to claim 1, characterized in that: and (3) denoising the electrocardiosignals by using a db6 wavelet, wherein in heartbeat segmentation, an R wave peak value point marked in an MIT-BIH database is used as a heartbeat segmentation reference point, 0.25s and 0.4s are respectively extracted before and after the R peak, 90 sampling points in front of the R peak are intercepted, and 144 sampling points behind the R peak are used as a complete heartbeat.

5. The BilSTM-Treg-based electrocardiosignal classification method according to claim 1, wherein the establishing of the BilSTM-Treg neural network model comprises the following steps: with xt=[xt1,xt2,…,xt235,]Representing a single heart beat sample, using a heart beat section consisting of t continuous single heart beats as the input of the network, wherein the single heart beat section is a single heart beatThe number t of heartbeats is the time step of the network; firstly, performing heart beat classification by using BilSTM, secondly, simulating the BilSTM by using a decision tree, calculating the average path length, and then training a multi-layer perceptron MLP model to obtain a proxy regularization functionThen will beAnd adding the training set into an objective function of the BilSTM model to perform the next round of training until the loss of the training set stops reducing, storing the model and interrupting.

6. The BilSTM-Treg-based electrocardiosignal classification method according to claim 1, characterized in that: the implementation method of tree regularization specifically comprises the following two stages: firstly, training a deep neural network, and simultaneously, tightly modeling by using a decision tree, so that the decision tree can accurately simulate the prediction process of the network; secondly, taking the average path length, which is the complexity measure of the decision tree, as a penalty term for model optimization;

the generation formula of the decision tree can be represented by formula (13) -formula (14),

wherein xnIn order to be a sample feature of the training set,is a prediction label of the depth model, W is a weight matrix in the depth model,a prediction tag for a decision tree;

the calculation formula for tree regularization is shown in equation (15),

wherein PathLength (tree, x)n) For the path length of the nth sample, Ω (W) is the average path length, i.e. the penalty term;

to use a gradient descent strategy in a network optimization process, a proxy regularization function is usedSo that it can proxy the previous APL calculation method, as shown in equation (16) and equation (17),

where ξ represents the weight matrix of the MLP model, ε is the regularization strength, { Wj,Ω(Wj) J represents the total number of datasets, and J represents the dataset of known parameter vectors and their corresponding true path lengths. Therefore, after using the proxy model, the objective function of the BilSTM-Treg neural network model is shown in formula (18),

7. the BilSTM-Treg-based electrocardiosignal classification method according to claim 1, characterized in that: 10 sampling points are extracted from the single heartbeat and used as key feature points of the single heartbeat to generate a decision tree in tree regularization modeling, the 10 key feature points are 126, 112, 162, 121, 153, 80, 224, 93, 100 and 120 respectively, the sampling points 126, 120, 121 and 153 correspond to ST segments, j points corresponding to 112, T wave end points corresponding to 224, T wave starting points corresponding to 162, Q wave peak values corresponding to 80, R wave peak values corresponding to 93 and S wave peak values corresponding to 100.

Technical Field

The invention belongs to the technical field of electrocardiosignal classification, and particularly relates to an electrocardiosignal classification method based on a BiLSTM-Treg.

Background

An Electrocardiogram (ECG) is a comprehensive expression of heart electrical activity on the body surface and contains abundant physiological and pathological information reflecting heart rhythm and electrical conduction thereof, and the conventional analysis of ECG waveform is manually performed by medical staff who need to give a diagnosis result according to cardiovascular disease diagnosis rules and personal experience. Because of the variety of electrocardiograms due to individual differences of patients and the complexity of diseases, the analysis of the ECG waveform is manually performed by a doctor, which requires the doctor to have a professional medical theoretical basis and a rich clinical experience. Because of the diversity of arrhythmias and the complexity of ECG waveforms, physicians are generally less efficient at classifying electrocardiograms.

With the rapid development of computer technology and electronic information technology, computers have become indispensable important tools for medical modernization, and home and abroad electrocardiogram researchers have proposed various heart beat classification methods which can be divided into two categories from the point of whether the feature extraction of electrocardiosignals needs to be carried out manually: a classification method based on feature engineering and a method based on deep learning. The traditional heart beat classification method based on rules and machine learning needs manual feature extraction, but due to the complex waveform of electrocardiosignals and poor anti-interference capability, the manually extracted features often generate artificial errors, and the manually designed features very depend on the prior knowledge of researchers.

The deep learning has the advantages of automatic feature extraction and classification, and a series of problems caused by manual feature extraction are well solved. Some researchers use a deep neural network model to automatically classify electrocardiosignals, and Acharya U Rajendra et al propose a 9-layer deep Convolutional Neural Network (CNN) for automatically identifying the electrocardiosignals, and use the original electrocardiosignals and the electrocardiosignals with high-frequency noise filtered to diagnose and classify heartbeats, wherein the accuracy rates are 94.03% and 93.47% respectively. Although chinese patent 201910095804.7 also proposes a heart beat classification method based on the BiLSTM-Attention deep neural network, although the above researches skillfully use the deep neural network to classify the electrocardiographic signals, the rhythm information between heart beats is not fully considered, the interpretability of the network is not analyzed, and the classification accuracy is still to be improved.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provide an electrocardiosignal classification method based on the BilSTM-Treg, by constructing a time sequence BilSTM-Treg neural network model fusing interna-heartbeat rhythm information and optimizing by using a tree regularization method, the generalization capability of the neural network model is improved, and the accuracy of heart beat classification is improved.

The technical scheme of the invention is as follows:

a method for classifying electrocardiosignals based on BilSTM-Treg comprises the following steps:

establishing a BiLSTM-Treg neural network model: the neural network model is obtained by taking heart beat data in an MIT-BIH arrhythmia database as a training set, forming continuous electrocardiosignals of a plurality of single heart beats into a heart beat section and training by using a tree regularized BilSTM model by taking the heart beat section as a unit; the electrocardiogram data is input into the neural network model by taking the heart beat section as a unit, so that the rhythm information contained in the heart beat section can be fully utilized by the model during heart beat type identification, and the classification accuracy is improved;

collecting electrocardiosignals;

preprocessing data: carrying out discrete wavelet transform denoising on the electrocardiosignals by using a computer, and then dividing the denoised electrocardiosignals by taking heart beats as units; the discrete wavelet transform denoises the electrocardiosignals, can avoid losing important physiological details in the electrocardiosignals, and better keeps the characteristics of the electrocardiosignals.

And (3) classifying the electrocardiosignals: and inputting the denoised electrocardio data into a BiLSTM-Treg neural network model for classification by taking the heartbeat section as a unit.

Further, the heartbeat section includes 10-15 single heartbeats.

Further, the heartbeat segment includes 15 single heartbeats.

Further, denoising the electrocardiosignals by using a db6 wavelet; during heart beat segmentation, the R wave peak value point marked in the MIT-BIH database is used as a heart beat segmentation reference point, 0.25s and 0.4s are respectively extracted before and after the R peak, 90 sampling points in front of the R peak are intercepted, and 144 sampling points behind the R peak are used as a complete heart beat.

Further, the establishing of the BilSTM-Treg neural network model comprises the following steps: with xt=[xt1,xt2,…,xt235,]Representing a single heart beat sample, taking a heart beat section consisting of continuous t single heart beats as the input of the network, wherein the number t of the single heart beats in the heart beat section is the time step of the network; firstly, performing heart beat classification by using BilSTM, secondly, simulating the BilSTM by using a decision tree, calculating the average path length, and then training a multi-layer perceptron MLP model to obtain a proxy regularization functionThen will beAnd adding the training set into an objective function of the BilSTM model to perform the next round of training until the loss of the training set stops reducing, storing the model and interrupting.

Further, the implementation method of tree regularization specifically includes the following two stages: firstly, training a deep neural network, and simultaneously, tightly modeling by using a decision tree, so that the decision tree can accurately simulate the prediction process of the network; secondly, taking the average path length, which is the complexity measure of the decision tree, as a penalty term for model optimization;

the generation formula of the decision tree can be represented by formula (13) -formula (14),

wherein xnIn order to be a sample feature of the training set,is a prediction label of the depth model, W is a weight matrix in the depth model,a prediction tag for a decision tree;

the calculation formula for tree regularization is shown in equation (15),

wherein PathLength (tree, x)n) For the path length of the nth sample, Ω (W) is the average path length, i.e. the penalty term;

in order to use a gradient descent strategy in the network optimization process, the method comprises the following stepsRegularizing functions with a proxySo that it can proxy the previous APL calculation method, as shown in equation (16) and equation (17),

where ξ represents the weight matrix of the MLP model, ε is the regularization strength, { Wj,Ω(Wj) J represents the total number of datasets, and J represents the dataset of known parameter vectors and their corresponding true path lengths. Therefore, after using the proxy model, the objective function of the BilSTM-Treg neural network model is shown in formula (18),

further, 10 sampling points are extracted from the single heartbeat and used as key feature points of the single heartbeat to generate a decision tree in tree regularization modeling, the 10 key feature points are respectively 126, 112, 162, 121, 153, 80, 224, 93, 100 and 120, the sampling points 126, 120, 121 and 153 correspond to an ST segment, a j point corresponding to 112, a T wave end point corresponding to 224, a T wave starting point corresponding to 162, a Q wave peak value corresponding to 80, an R wave peak value corresponding to 93 and an S wave peak value corresponding to 100.

Further, the Value in the Value field in the decision tree represents the percentage of the number of heartbeats in the five categories, N, S, V, F, Q, to the total number of heartbeats in the corresponding category, respectively, the sampling point 126 is the root node of the simulation decision tree, and the other nine sampling points are leaf nodes of the simulation decision tree.

Compared with the prior art, the invention has the beneficial effects that:

according to the invention, by constructing the time sequence BilSTM-Treg neural network model fusing the internodal rhythm information and optimizing by using a tree regularization method, the generalization capability of the neural network model is improved, and the accuracy of heart beat classification is improved;

the invention fuses rhythm information beneficial to heart beat classification into a BilSTM-Treg neural network model, particularly, when a data set is processed, continuous single heart beats are formed into heart beat sections, rhythm information between heart beats is reserved, and then electrocardiogram data is input into the neural network model by taking the heart beat sections as units, so that the model can fully utilize the rhythm information contained in the heart beat sections during heart beat type identification, and the accuracy rate of heart beat classification is improved compared with other deep learning methods;

the heart beats are divided into five types (non-ectopic (N), supraventricular ectopic (S), ventricular ectopic (V), fused heart beats (F) and unknown heart beats (Q)) and verified on an MIT-BIH arrhythmia database, and the result shows that the overall classification accuracy of the algorithm is 99.32 percent; compared with other heart beat classification methods, the BilSTM-Treg algorithm provided by the method not only improves the classification accuracy rate and obtains higher sensitivity and positive prediction value, but also has certain interpretability.

Drawings

FIG. 1 is a comparison graph of electrocardiosignals before and after preprocessing of discrete wavelet transform in embodiment 1 of the present invention.

FIG. 2 is a single heart beat morphology chart and a heart beat segmentation chart in example 1 of the present invention.

Fig. 3 is a flow processing diagram of the BiLSTM-Treg neural network model according to embodiment 1 of the present invention.

FIG. 4 is a description of the BilSTM-Treg model algorithm of example 1 of the present invention.

Fig. 5 is a schematic diagram of the positions of 10 key feature points in the electrocardiographic waveform according to embodiment 2 of the present invention.

Fig. 6 is a schematic diagram of a decision tree according to embodiment 2 of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Example 1

A method for classifying electrocardiosignals based on BilSTM-Treg comprises the following steps:

establishing a BiLSTM-Treg neural network model: the neural network model is obtained by taking heart beat data in an MIT-BIH arrhythmia database as a training set, forming continuous electrocardiosignals of a plurality of single heart beats into heart beat sections, training by using a tree regularized BilSTM model by taking the heart beat sections as units, and storing an optimal model; the electrocardiogram data is input into the neural network model by taking the heart beat section as a unit, so that the rhythm information contained in the heart beat section can be fully utilized by the model during heart beat type identification, and the classification accuracy is improved;

collecting electrocardiosignals;

preprocessing data: the preprocessing stage is mainly used for denoising and segmenting the electrocardiosignals, generally, the acquired electrocardiosignals inevitably contain noise due to the influence of equipment and a human body, and the noise mainly comprises baseline drift, power frequency interference and myoelectricity interference; carrying out discrete wavelet transform denoising on the electrocardiosignals by using a computer, and then dividing the denoised electrocardiosignals by taking heart beats as units;

the discrete wavelet transform is used for denoising the electrocardiosignals, so that time-frequency analysis of the electrocardiosignals can be well performed, and compared with equal-interval time-frequency positioning of short-time Fourier transform, the wavelet transform can provide higher frequency resolution at low frequency and higher time resolution at high frequency, so that important physiological details in the electrocardiosignals can be avoided being lost, and the characteristics of the electrocardiosignals can be better kept;

and (3) classifying the electrocardiosignals: and inputting the denoised electrocardio data into a BiLSTM-Treg neural network model for classification by taking the heartbeat section as a unit.

The inter-cardiac rhythm information contained in the electrocardiogram is an important basis for classifying the electrocardiogram, and the common rhythm types are as follows: bigeminal, trigeminy, ventricular rate, atrial rate. Bigeminal law: after each normal heartbeat, a premature beat appears, and three or more groups appear continuously and are called bigeminal rules; according to the type of premature beat, the method can be divided into a ventricular premature bigeminal law and an atrial premature bigeminal law; rhythmic changes such as N-V-N-V-N-V are the ventricular-premature bigeminy, and rhythmic changes such as N-S-N-S-N-S are the atrial-premature bigeminy. Triple law: a premature beat appears after every two normal heartbeats; three or more groups appear continuously and are called triple laws; according to the type of premature beat, the three-phase ventricular premature beat and the three-phase atrial premature beat can be divided; the rhythmic change such as N-N-V-N-N-V-N-N-N-V is atrioventricular early triple rhythm, and the rhythmic change such as N-N-S-N-N-S-N-N-S is atrioventricular early triple rhythm. Room speed: three or more ventricular premature beats in succession, such as: the rhythm of V-V-V changes. Room speed: three or more atrial premature beats in succession, such as: the rhythm of S-S-S changes. In addition, the occurrence of certain types of heartbeats reflects changes in the electrocardiographic rhythm, such as after a persistent ventricular rhythm, a ventricular fusion heartbeat often occurs due to electrical signals from the sinoatrial node, followed by a ventricular capture heartbeat, and thus ventricular fusion heartbeat and ventricular capture are important features of ventricular rhythm.

The invention fuses the rhythm information beneficial to heart beat classification into a BilSTM-Treg neural network model. Continuous single heart beats are combined into heart beat segments during data preprocessing, so that rhythm information between heart beats is reserved, and then the electrocardiogram data is input into the neural network model by taking the heart beat segments as units, so that the model can simultaneously acquire related information of front and back heart beats during heart beat type identification, fully utilize the rhythm information contained in the heart beat segments, and improve the classification accuracy. Further, the heart beat section comprises 10-15 single heart beats, and preferably, the heart beat section comprises 15 single heart beats; within 15 heart beats, rhythm information of heart beats such as bigeminal rhythm, trigeminy rhythm, atrial velocity, ventricular velocity and the like can be expressed within 15 heart beats. If the heartbeat section is too long, heartbeat information is too redundant, and the performance of the network is influenced; if the heart beat segment length is less than 15, it may not be sufficient to cover all heart beat rhythm types and the accuracy rate is reduced.

Further, a db6 wavelet is used for denoising the electrocardiosignals to obtain good classification accuracy, the db6 wavelet has high regularity, so that the reconstructed signals are smooth, and discrete wavelet transformation formulas are as formulas (1) and (2):

Ψj,k(x)=a0 -j/2Ψ(a0 -jx-kb0) Formula (2)

Wherein WΨ(j, k) is the wavelet coefficient, Ψj,k(x) Is a discrete wavelet function under different scales and different positions, f (x) is an input electrocardiosignal, psi (k) is a wavelet basis function, j is the order of the scale, the larger j is, the smaller scale is, the higher frequency is equivalent to, the closer to the details are, k is the offset of the position, a0Is a scale parameter, b0Is a location parameter. The signal pair before and after preprocessing by using discrete wavelet transform is shown in fig. 1, the graph on the left side of fig. 1 is the original electrocardiosignal before processing, and the graph on the right side of fig. 1 is the electrocardiosignal after denoising.

Further, as shown in fig. 2, heart beat segmentation is to divide an electrocardiogram record by taking a complete heart beat as a unit, where a complete heart beat should include a P wave, a QRS complex and a T wave, in this embodiment, an R wave peak point labeled in the MIT-BIH database is used as a heart beat segmentation reference point, 0.25s and 0.4s are respectively extracted before and after the R peak, 90 sampling points before the R peak are intercepted, and 144 sampling points after the R peak are used as a complete heart beat.

Further, tree regularization is used in the Bi-LSTM model in order to optimize the model, reduce the generalization error of the model, and improve the classification accuracy, and meanwhile, the generated simulation decision tree analysis is used to understand how the BiLSTM model performs the heart beat classification, and the Bi-LSTM model using tree regularization, i.e., the BiLSTM-Treg neural network model, is shown in fig. 3 and 4: the method for establishing the BiLSTM-Treg neural network model comprises the following steps: with xt=[xt1,xt2,…,xt235,]Representing a single heart beat patternThe method comprises the steps of taking a heart beat section consisting of t continuous single heartbeats as the input of a network, wherein the number t of the single heart beats in the heart beat section is the time step length of the network; firstly, performing heart beat classification by using BilSTM, secondly, simulating the BilSTM by using a decision tree, calculating the average path length, and then training a multi-layer perceptron MLP model to obtain a proxy regularization functionThen will beAnd adding the training set into an objective function of the BilSTM model to perform the next round of training until the loss of the training set stops reducing, storing the model and interrupting.

Further, the implementation method of tree regularization specifically includes the following two stages: firstly, training a deep neural network, and simultaneously, tightly modeling by using a decision tree, so that the decision tree can accurately simulate the prediction process of the network; secondly, taking the average path length, which is the complexity measure of the decision tree, as a penalty term for model optimization;

the generation formula of the decision tree can be represented by formula (13) -formula (14),

wherein xnIn order to be a sample feature of the training set,is a prediction label of the depth model, W is a weight matrix in the depth model,a prediction tag for a decision tree;

the calculation formula for tree regularization is shown in equation (15),

wherein PathLength (tree, x)n) For the path length of the nth sample, Ω (W) is the average path length, i.e. the penalty term;

to use a gradient descent strategy in a network optimization process, a proxy regularization function is usedSo that it can proxy the previous APL calculation method, as shown in equation (16) and equation (17),

building a mapping relation between a parameter vector W of a neural network model and the average path length by training a multilayer perceptron, taking W and APL as the input of a MLP (multi-level perceptron), wherein the APL represents the shortest path length, and an objective function is shown as a formula (17);

where ξ represents the weight matrix of the MLP model, ε is the regularization strength, { Wj,Ω(Wj) J represents the total number of datasets, and J represents the dataset of known parameter vectors and their corresponding true path lengths. Therefore, after using the proxy model, the objective function of the BilSTM-Treg neural network model is shown in formula (18),

the heart beat data in the MIT-BIH arrhythmia database is used as a training set and is the most applied database of researchers, the database comprises 48 records, the length of each data is about 30 minutes, about 65 ten thousand sampling points are provided, and the sampling frequency is 360 HZ. The MIT-BIH arrhythmia database was labeled in fifteen categories. And ANSI/AAMI EC57 according to the Association for the advancement of medical instruments (AAMI): 2012 classification can classify arrhythmias into five major classes: n (normal or bundle branch block), S (supraventricular ectopic beat), V (ventricular ectopic beat), F (fused beat) and Q (unspecified beat).

The present invention classifies 109454 heartbeats in the MIT-BIH arrhythmia database according to five categories of the medical instrument facilitation association, including 90, 595 heartbeats in the N category; 2,781S categories of heart beats; 7,235V categories of heart beats; the number of heartbeats in category F is only 802; 8041Q categories of heart beats. Here, 90% of the heart beat data was randomly selected from the data set as a training set, and the remaining 10% was tested, and the specific distribution of the data is shown in table 1 below:

TABLE 1 statistics of the experimental data

To calculate the performance of the BilSTM-Treg neural network model in classifying heart beats, the classification result is divided into four classes, namely TP, FP, TN and FN. Taking N classes as examples, equations (19) - (22) respectively represent the calculation methods of N classes of true positive heart beats (TPN), N classes of false positive heart beats (FPN), N classes of true negative heart beats (TNN), and N classes of false negative heart beats (FNN). Table 2 shows the confusion matrix of the classification results.

Table 2: cardiac beat classification result statistics

TPNNon formula (19)

FPNFormula (20) of Sn + Vn + Fn + Qn

TNN(vii) Ss + Sv + Sf + Sq + Vs + Vv + Vf + Vq + Fs + Fv + Ff + Fq + Qs + Qv + Qf + Qq formula (21)

FNNNs + Nv + Nf + Nq equation (22)

To test the performance of neural network model classification, the present invention uses sensitivity, specificity, positive predictive value, and accuracy as specific indicators. The sensitivity (Se), also called recall, is the proportion of correctly determined positive samples to actually positive samples; the higher the sensitivity, the larger the proportion of samples that are correctly predicted. Specificity (SP) is the proportion of correctly determined negative samples to the proportion of actually negative samples. The positive predictive value (+ p) is the proportion of correctly judged positive samples to all the positive samples judged to be positive. Accuracy (Acc), which is the ratio of the sum of true positives and true negatives to the total number of samples, reflects the agreement between test and actual results. The calculation formulas of the above four evaluation indexes are shown in (23-26):

se is TP/(TP + FN) formula (23)

Sp ═ TN/(TN + FN) formula (24)

+ p ═ TP/(TP + FP) equation (25)

Acc is (TP + TN)/(TP + TN + FP + FN) formula (26)

Tests show that the total classification accuracy of the BilSTM model is 99.12-99.18% when the heart-beat length is 10-15 single heart beats, and the accuracy is 99.18% when the heart-beat length is 15.

And the optimized BilSTM-Treg neural network model is obtained after the network weight of the BilSTM model is constrained by tree regularization, 10% of data which are not trained by the MIT-BIH arrhythmia database data set are used for testing, the overall classification accuracy reaches 99.32%, and the feasibility and the effectiveness of the method are proved. Compared with the prior tree regularization optimization, the total accuracy of the BiLSTM-Treg is improved by 0.14 percent compared with that of the BiLSTM, the accuracy of S, V and F is improved, wherein the accuracy of F is improved obviously and is improved by 5.62 percent. Table 3 shows the classification results and performance before and after the tree regularization optimization.

The model fuses rhythm information between heartbeats into a time sequence network, so that the network can effectively learn the information, the optimal heart beat segment length is selected, and automatic classification of heartbeats is realized. Experiments are carried out on the MIT-BIH arrhythmia database, and the results show that the method can effectively distinguish N, S, V, F, Q types of heart beats, and the average classification accuracy rate reaches 99.32%. The sensitivity of the model is low except for F types, other indexes have obvious advantages, and the sensitivity of S types is obviously improved compared with other methods in the view of heart beat types.

Example 2

This example is another embodiment based on example 1, and the description of the same technical solution as in example 1 will be omitted, and only the technical solution different from example 1 will be explained.

Compared with embodiment 1, in the embodiment, when the denoised electrocardiographic data is analyzed, only 10 sampling points are extracted from the single heart beat and are used as key feature points of the single heart beat for analysis.

As shown in fig. 5, 10 sampling points are extracted from a single heartbeat and used as key feature points of the single heartbeat to perform generation of a decision tree in tree regularization modeling, where the 10 key feature points are 126, 112, 162, 121, 153, 80, 224, 93, 100, and 120 respectively, the sampling points 126, 120, 121, and 153 correspond to an ST segment, j points corresponding to 112, T wave end points corresponding to 224, T wave start points corresponding to 162, Q wave peak values corresponding to 80, R wave peak values corresponding to 93, and S wave peak values corresponding to 100. Sample point 126 is the point of the ST segment in the electrocardiographic waveform, which is the segment from the end of the QRS complex to the beginning of the T wave, representing the time period [40] between ventricular depolarization and ventricular repolarization, with the normal ST segment smooth and flush with baseline. Sample point 224 is the end of the T wave in the electrocardiographic waveform, which is a wave with a large amplitude and a long duration after the QRS complex, showing the process of ventricular repolarization. Sample point 112 is the J point in the electrocardiographic waveform, which is the junction of the end of the QRS complex and the start of the ST segment. Sample 93 and sample 100 are the R and S waves of the electrocardiographic waveform, respectively, which together with the Q wave corresponding to sample 80 form the QRS complex. The QRS complex is a complex and large wave amplitude group, and shows the process of ventricular depolarization

The above 10 key feature points were used as features of a single heart beat and BilSTM-Treg was used for heart beat classification. The results of the experiment are shown in table 4, and the overall classification accuracy is 98.45%. Table 4 is based on key feature points and the results of the classification of the BiLSTM-Treg algorithm.

Table 4 is based on key feature points and the results of the classification of the BiLSTM-Treg algorithm.

Compared with the BilSTM-Treg which does not only use the 10 sampling point data, the sensitivity of the embodiment except the S class is not obviously reduced by all the other indexes. By taking 10 key feature points as the features of the single heartbeat, the electrocardiogram analysis is carried out, the calculation amount can be greatly reduced, and the classification efficiency of the BiLSTM-Treg neural network model is improved.

The following is an interpretable analysis of the BilSTM-Treg neural network model by using a decision tree, and the decision tree generated by the above 10 key feature points is still used for explanation because the number of feature points of a single heart beat is large and the generated simulation decision tree is too large:

as shown in fig. 6, the values in the Value field in the decision tree represent the number of heartbeats in the five categories, N, S, V, F, Q, as a percentage of the total number of heartbeats in the corresponding category, respectively, the sampling point 126 is the root node of the simulation decision tree, and the other nine sampling points are the leaf nodes of the simulation decision tree. Taking node 2 as an example, 0.08 in Value represents that the number of S type heart beats in the node is 0.08% of the total number of S type heart beats, which means that the node contains almost no S type heart beats.

(1) The sampling point 126 is the root node of the analog decision tree, and the sample can be divided into two parts, namely node 2 and node 3, according to whether the voltage value at the point is less than-0.0692 mv. In node 2, the class F and class Q heart beats are more abundant, and the rest three classes have less heart beats. Thus, sample point 126 separates 28.95% of class F heartbeats and 46.22% of class Q heartbeats from the total sample.

(2) Node 2 distinguishes class F heartbeats from class Q heartbeats according to the value of sample point 224, as shown by nodes 11 and 12, where there are only 0.38% class Q heartbeats in node 11 and 0% class S beats in node 12.

(3) Node 3 separates 25.1% of class V heartbeats from 25.53% of class Q heartbeats from node 3 as indicated by node 5 based on the value of sample point 112. Node 5 distinguishes class S from class Q heartbeats based on the value of sample point 153, as indicated by nodes 14 and 15.

(4) Node 4 separates 26.00% of the class V heartbeats from node 4 based on the value of sample point 162, as indicated by node 13. Node 6 separates 14.85% of class V heartbeats and 12.59% of class F heartbeats from node 6, as indicated by node 16, based on the value of sample point 80.

(5) Node 8 shows that node 7 separates 11.88% of class N, 34.33% of class S, 13.11% of class V, 3.22% of class F, and 19.53% of class Q heartbeats from the sample at node 7 according to the value of sample point 93, and finally separates 6.81% of class V at node 18, 15.78% of class Q at node 19, and 21.62% of class S heartbeats at node 20 via nodes 9 and 10.

Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and/or modifications of the invention can be made, and equivalents and modifications of some features of the invention can be made without departing from the spirit and scope of the invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基线漂移曲线的生成方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!