Skip to content

Latest commit

 

History

History
110 lines (65 loc) · 5.1 KB

File metadata and controls

110 lines (65 loc) · 5.1 KB

Disease-classification-Using-Spline-Representation-VCG

Myocardial infarction (MI)-induced changes in the morphological and temporal wave features are extracted from the derived VCG using spline approximation.

After the feature extraction, a classifier based on multilayer perceptron network (MLP) is used for MI classification.

Experiments on PTB diagnostic database demonstrate that the proposed system achieved satisfactory performance to differentiating MI patients from healthy subjects and to localizing the infarcted area.

Details of this study please refer to 👉 https://doi.org/10.3390/s20247246

System structure

This project implement only the latter part of the proposed system. (The other part will be added soon) image

Dataset

To automatically download the records from PTD database, please refer to 👉 https://github.com/yuhung1206/Auto_download_PTB
image

Execution

  1. Spline-based feature extraction spline

    • Main program: SplineFeatureExtract.m

    • Sub programs: SplineFit_1lead_ECG.m, SplineFit_2lead_ECG.m, SplineFit_3lead_ECG.m, pan_tompkin.m

      image

      Code function
      SplineFit_klead_ECG.m extract feature from k leads & generate label for learning
      pan_tompkin.m [1][2] R-peak detection
      plotATM.m Load .mat and .info files
    • Get function "plotATM.m" from physionet website
      👉 https://archive.physionet.org/physiotools/matlab/plotATM.m

    • Get function "pan_tompkin.m"
      👉 https://www.mathworks.com/matlabcentral/fileexchange/45840-complete-pan-tompkins-implementation-ecg-qrs-detector

    • Set the lead_Num as [13,14,15] to extract features from VCG (Vx, Vy, Vz)
      image

    • Set Output Name & directory to store features
      image

    • Input filename make sure that input filename is correct
      image

    • Choose how many leads to extract:
      SplineFit_1lead_ECG.m -> 1 lead features(18 dimension)
      SplineFit_2lead_ECG.m -> 2 lead features(35 dimension)
      SplineFit_3lead_ECG.m -> 3 lead features(52 dimension)

      image

      • The setting to extract features from Vx+Vy leads is shown below: image
        and select the function SplineFit_2lead_ECG.m
        image
    • Start extraction

  2. Multi-Layer-Perceptron MLP
    Note: input are features rather than signals

    • Main program: Classification_SMOTE.m

    • Sub programs: mySMOTE.m

      Code function
      Classification_SMOTE.m FNN for classification
      mySMOTE.m deal with the imbalanced database
    • Get mySMOTE.m from [3] 👉 https://www.mathworks.com/matlabcentral/fileexchange/70315-smote-over-sampling

      image

    • make sure InputName is correct:
      image

    • the classification performance will be stored in total variable:
      Because it is 12-type classification, the size of total is [12x12].

    • start training

      image

Reference

[1] Sedghamiz. H, "Matlab Implementation of Pan Tompkins ECG QRS detector.", March 2014. https://www.researchgate.net/publication/313673153_Matlab_Implementation_of_Pan_Tompkins_ECG_QRS_detect
[2] PAN.J, TOMPKINS. W.J,"A Real-Time QRS Detection Algorithm" IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. BME-32, NO. 3, MARCH 1985.
[3] Abhishek Gupta (2021). SMOTE-over-Sampling (https://github.com/earthat/SMOTE-over-Sampling), GitHub. Retrieved September 11, 2021.