-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the DeepLearning wiki!
Models and Methods
We obtained the dataset of ECG signals along with the labels from the datasets provided in the Machine Learning class of 2017 (Kaggle, ML-2017 [12]). The signal is sampled at 150Hz. The dataset consists of 6822 ECG signals out of which 4040 signals are obtained from healthy individuals and 2192 ECG signals are taken from the individuals with a heart condition (Atrial flutter or Atrial fibrilation). The rest of the signals (590) correspond to ventricular diseases which we ignore in this work. In this way, the dataset includes 4040 healthy signals (label 0) and 2192 signals with heart condition (label 1). We divided our dataset in 3 parts, the 80% of the signals were used for the training, and 20% of the signals were used for testing. Note, that we perform this split before training. That is, the labels of the testing dataset were exclusively used for final test score, not for training. For the having a better accuracy of the training set, we performed cross-validation in this data partition [13]. From the training data, 90% was used for training and 10% was used for validation.
Fig. 1 shows a comparison of ECG of a healthy heart with that of one of the heart conditions described above. A quick look suggests that the pulses are quite irregular for a heart condition. This will probably be reflected in Fourier transformed ECG data. Taking a clue from this, we perform Fourier transform and apply deep neural networks (DNN) for classification. A detailed description of our neural network architecture is described below.
Preprocessing and DNN architecture:
For processing, we select the first 27 seconds of the ECG signal corresponding to 4096 data points. The shortened ECG signal is first transformed to have zero mean and a unit variance (the so called standard scalar data). It is then smoothened by first using Daubechies Wavelet transform (db6) and then back-transforming to time domain ignoring the last two sets of Wavelet coefficients. This smoothens the otherwise noisy ECG while preserving its characteristic QRS complex. Fourier transform is performed on the smoothened dataset. This yields us with Fourier transform having 4056 Fourier coefficients. This is smoothened by using a smoothing window of width 5. It is then downsampled by taking every 4th coefficient leaving 507 coefficients to the neural network. It is then passed through the 4-layer DNN architecture. The first layer consists of fully connected DNN with 1014 outputs. The next layer has 252 outputs while the one after that has 63 outputs. The last layer then transforms the signal to the two point logits. A dropout layer with dropout rate of 10% is inserted before the last layer to avoid overfitting. Each layer uses Rectified Linear Unit (ReLU) as a non-linear activation function. The outputs of the last layer are transformed to the class probabilities by passing them through the softmax layer. The DNN architecture is shown in Table 1.