Advertisement

ECG分析:基于深度学习的ECG心律失常分类入门(4)

阅读量:

ECG分析:基于深度学习的ECG心律失常分类入门(4)

在进行模型搭建之前讲解本次任务需要明确区分的类别时 MITAB依据心跳类型将其划分为14个细分类别

在这里插入图片描述

也可以用wfdb查看:

复制代码
    wfdb.show_ann_labels()
    
    
      
    
    代码解读
复制代码
    label_store symbol                                    description
    0             0                              Not an actual annotation
    1             1      N                                    Normal beat
    2             2      L                  Left bundle branch block beat
    3             3      R                 Right bundle branch block beat
    4             4      a                Aberrated atrial premature beat
    5             5      V              Premature ventricular contraction
    6             6      F          Fusion of ventricular and normal beat
    7             7      J              Nodal (junctional) premature beat
    8             8      A                   Atrial premature contraction
    9             9      S     Premature or ectopic supraventricular beat
    10           10      E                        Ventricular escape beat
    11           11      j                 Nodal (junctional) escape beat
    12           12      /                                     Paced beat
    13           13      Q                            Unclassifiable beat
    14           14      ~                          Signal quality change
    16           16      |                     Isolated QRS-like artifact
    18           18      s                                      ST change
    19           19      T                                  T-wave change
    20           20      *                                        Systole
    21           21      D                                       Diastole
    22           22      "                             Comment annotation
    23           23      =                         Measurement annotation
    24           24      p                                    P-wave peak
    25           25      B              Left or right bundle branch block
    26           26      ^                      Non-conducted pacer spike
    27           27      t                                    T-wave peak
    28           28      +                                  Rhythm change
    29           29      u                                    U-wave peak
    30           30      ?                                       Learning
    31           31      !                       Ventricular flutter wave
    32           32      [      Start of ventricular flutter/fibrillation
    33           33      ]        End of ventricular flutter/fibrillation
    34           34      e                             Atrial escape beat
    35           35      n                   Supraventricular escape beat
    36           36      @  Link to external data (aux_note contains URL)
    37           37      x             Non-conducted P-wave (blocked APB)
    38           38      f                Fusion of paced and normal beat
    39           39      (                                 Waveform onset
    40           40      )                                   Waveform end
    41           41      r       R-on-T premature ventricular contraction
    
    
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    
    代码解读

根据AAMI标准,这14个小类集成为5个大类(N, SVEB, VEB, F, Q):

在这里插入图片描述

本研究也聚焦于这五个主要类别进行。因此,在采集心拍时就需要按照标签分类标准实现分类目标:

复制代码
    #这是截取中间步骤的代码块
    if label[j]=='A' or label[j]=='a' or label[j]=='J' or label[j]=='S':
    Seg=record[label_index[j]-144:label_index[j]+180]
    segment=resample(Seg,251, axis=0) #根据文章要求,重采样到251个点
    SVEB_Seg.append(segment)           
    
    
      
      
      
      
      
    
    代码解读

在此阶段心拍信号已成功采集并进行了分类处理。下面进入模型构建阶段(此处无需深入讲解卷积神经网络的基本原理需耗费大量篇幅)让我们立即着手构建模型结构吧:

在这里插入图片描述

最初为324的心率时间序列长度,在这一部分中输入数据为251个心拍周期,在此我对心率时间序列进行了重采样处理,使其与现有数据集中的251个样本保持一致

在这里插入图片描述

这里,作者是先截取心拍,然后数据集划分,采用了三个不同折的交叉验证:

在这里插入图片描述

采用基于intra-patient的分类方法进行研究时

总结

本篇就介绍到这里,如果存在错误和疏漏,欢迎提出批评指正!具体代码实现,我会上传到个人的GitHubhttps://github.com/cay846545867上,记得给颗小星星鼓励一下哦(点个赞也行的)!!!笔芯笔芯~~~
下一篇笔记将会对实验结果做一个评估和分析。

全部评论 (0)

还没有任何评论哟~