ChapterPDF Available

Implementation of Time-Frequency Moments for the Classification of Atrial Fibrillation Sequences Through a Bidirectional Long-Short Term Memory Network

Authors:

Abstract and Figures

This article proposes a method to classify atrial fibrillation signals using time-frequency characteristics through a BiLSTM network. The experiment was performed with the ECG signals, which are part of the PhysioNet CinC 2017 database. In addition to the BiLSTM network, machine learning algorithms such as k Nearest Neighbors, Linear SVM, RBF SVM, Decision Tree, Random Forest, Neural Net, AdaBoost, Naive Bayes and QDA were used for the classification experiments. To measure the efficiency and quality of the proposed method, the Accuracy, Precision , Recall, F1 Score metrics were used, as well as the Cohen Kappa score and the Mathews correlation coefficient. The results obtained show a better classification performance in the BiLSTM Network with 93.57%, 92.86%, 94.20%, 93.53%, 1.0 and 1.0 of the mentioned metrics.
Content may be subject to copyright.
Implementation of Time-Frequency
Moments for the Classification of Atrial
Fibrillation Sequences Through
a Bidirectional Long-Short Term Memory
Network
Christian Garc´ıa-Aquino1, Dante ujica-Vargas1(B
),
Manuel Matuz-Cruz2, Nimrod Gonzalez-Franco1,
and Gabriel Gonz´alez-Serna1
1Tecnol´ogico Nacional de exico, CENIDET, Cuernavaca, Mexico
{m21ce012,dante.mv}@cenidet.tecnm.mx
2Tecnol´ogico Nacional de exico, Campus Tapachula, Tapachula, Mexico
Abstract. This article proposes a method to classify atrial fibrillation
signals using time-frequency characteristics through a BiLSTM network.
The experiment was performed with the ECG signals, which are part of
the PhysioNet CinC 2017 database. In addition to the BiLSTM network,
machine learning algorithms such as k Nearest Neighbors, Linear SVM,
RBF SVM, Decision Tree, Random Forest, Neural Net, AdaBoost, Naive
Bayes and QDA were used for the classification experiments. To measure
the efficiency and quality of the proposed method, the Accuracy, Preci-
sion, Recall, F1 Score metrics were used, as well as the Cohen Kappa
score and the Mathews correlation coefficient. The results obtained show
a better classification performance in the BiLSTM Network with 93.57%,
92.86%, 94.20%, 93.53%, 1.0 and 1.0 of the mentioned metrics.
Keywords: Atrial fibrillation ·Feature extraction ·BiLSTM ·
Time-frequency ·ECG ·PhysioNet
1 Introduction
Abnormalities of the circulatory system are the most common cardiac disorders
addressed with Electrocardiography (ECG). The importance of these studies is
motivated by the prevalence, which is relatively high considering that around
3% of the world population suffers from some anomaly. Such is the case that
studies have been carried out focused on the classification of Atrial Fibrillation
(AF), this being one of the most common types of arrhythmias [1].
In this sense, the use of deep learning has become popular for its classifica-
tion, abstraction and, above all, learning capabilities that make it attractive in a
wide range of approaches that can hardly be solved with conventional comput-
ing equipment [2,3]. Consequently, works are emerging that emphasize proposing
c
The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
M. F. Mata-Rivera et al. (Eds.): WITCOM 2022, CCIS 1659, pp. 1–14, 2022.
https://doi.org/10.1007/978-3-031-18082-8_13
2C.Garc´ıa-Aquino et al.
increasingly complex neural network models, so that the computational cost to
train these models ends up increasing and ends up resulting in low performance.
These limitations can be resolved by focusing on the field of digital signal pro-
cessing, which would help improve the performance of deep models and would
lead to the use of models with a relatively low computational cost for classifica-
tion tasks.
In the literature, there are approaches to AF classification using LSTM con-
volutional neural networks (CNN-LSTM) [4], deep residual-jump convolutional
neural networks [5], one-dimensional convolutional neural networks (1D-CNN)
[6], Hierarchical Attention Networks (HAN) [7], Multiscale Fusion Neural Net-
works (DMSFNet) [8] and Deep Neural Networks with attention mechanisms [9].
As for classical learning algorithms, there are approaches using AdaBoost [10]
and Support Vector Machines (SVM) [11].
Regarding the context of signal processing, there are works that focus on
extracting RR peaks from ECGs [12,13], the characterization of heart rate short-
age (HRV) [14], the use of the random process correlation function [15], ECG
language processing [16], the decomposition of the signal in multiple scales [17],
among other existing works in the literature just to mention those that are con-
sidered most relevant to the investigation.
As can be seen throughout this section, important approaches have been
generated that contribute to the field of AF. However, the use of hybrid neural
networks may give the impression of offering good classification performance, but
by not employing significant or discriminating features, the models are unable
to learn the dependencies of the ECG signals. In this sense, it would also entail
an enormous computational cost generated by the model. On the other hand, a
correct feature extraction method is not specified since the nature of ECG data
is time dependent and such property cannot be exploited in depth.
There is a previous work where the classification of arrhythmias was car-
ried out by extracting artisanal features using the wavelet packet transform and
classifying them with classical machine learning algorithms [18]. Therefore, the
purpose of this article is to propose a new method to classify AF this time using
time-frequency characteristics. The main idea of this approach is to carry out a
robust and efficient treatment of ECG signals by generating Spectrograms, which
will allow us to obtain time-frequency moments to improve the performance of
a Deep Hybrid Neural Network and reduce the computational cost.
The rest of this document is organized as follows. In Sect. 2, a brief introduc-
tion to the short-term fourier transform, as well as the classification algorithms
used during the experimentation. The method of implementation for the classi-
fication of Atrial Fibrillation is indicated in Sect. 3. The results obtained from
the experiments and a comparative analysis are presented in Sect.4. Conclusions
are mentioned in the final section and future work is described.
Classification of Atrial Fibrilation 3
2 Background
2.1 Recurrent Neural Networks
Recurrent Neural Networks (RNN) are used to analyze data that changes over
time. Commonly used for speech recognition, image subtitles or character pre-
diction for source code generation [19]. To allow the network to store and access
input histories, recursive connections are introduced to predict the current time
step and transferring that prediction to the next step as an input. According
to Fig. 2, an RNN model has the same structure as the classic ANN models,
with an input layer, nhidden layers and an output layer, without forgetting the
parameter tcorresponding to time, being xt1,xtand xt+1 are the inputs of the
RNN model at different instants of time. (Fig. 1).
Fig. 1. Basic structure of an RNN [19].
In the most basic form of an RNN, its learning function is found in the Eq. 1
for the hidden layers and in the Eq.2for the output layer.
h[t]=f(Wh
x(x[t]+bh)+Wh
h(h[t1] + bh)) (1)
y[t]=g(Wo
h(h[t]+bo)) (2)
2.2 Short Time Fourier Transform
The Short Time Fourier Transform (STFT) is responsible for analyzing non-
stationary signals through the Fourier Transform (TF). Where the STFT consists
of dividing the signal into small time segments in such a way that it can be
assumed that for each segment the signal is stationary, and thus calculate the
TF in each portion of the signal, which is taken as a window that slides along
the time axis, resulting in a two-dimensional representation of the signal [20].
Mathematically, it is written as:
STFT x(t)=X(τ,ω)=
−∞
x(t)w(tτ)ejωtdt (3)
where w(t) is the Hann or Gaussian hill window function initialized at 0 and x(t)
is the input signal to transform, X(τ,ω) is essentially the TF of x(t), w(tτ)is
4C.Garc´ıa-Aquino et al.
a complex function that represents the phase and magnitude of the signal over
time and frequency. Concurrently the instantaneous phase is used in conjunction
with the time axis τand the frequency axis ωto suppress any resulting phase
jump discontinuities in the STFT. The time index τis normally considered a
“slow” time and is usually not expressed with as high a resolution as the time t.
3 Implementation
In order to classify arrhythmias, a methodology for classifying electrocardio-
graphic signals is analyzed in this section, starting with their acquisition and the
segmentation of the QRS complexes present. Likewise, the process of extraction
of statistical characteristics is analyzed, which are subjected to a dimension-
ality reduction. Finally, the classification is performed with machine learning
algorithms. A description of the aforementioned can be seen in Fig 2.
Fig. 2. Proposed classification method
3.1 Data Acquisition/Segmentation
For the experimentation of this research, the ECG data of the PhysioNet 2017
Challenge [21] were used, which consist of a set of ECG signals sampled 300Hz
and divided by a group of experts, which are classified as Normal (N), AFib (A),
Noisy signal (), and Other signal (O). The reason for using this data set is
because it mainly contains the two classes that interest us for the classification
tasks, these being: Normal (N), AFib (A), added to the fact that the character-
istic of the ECG signals is that they are of a single derivation and the duration
in seconds of an individual signal is mostly around 30 s. A graphic representation
of the signals present in the ECG’s can be seen in Fig. 3.
Classification of Atrial Fibrilation 5
(a) Normal Signal (b) Signal with AF
Fig. 3. Signals from the selected database.
3.2 Feature Extraction
The next step after acquiring the signals and segmenting them is the generation
of Spectrograms using the STFT, which will serve to extract specific character-
istics such as the Time-Frequency moments, which for the work in question was
considered the first moment as the Frequency Instantaneous and the second as
Spectral Entropy.
Spectrograms. The spectrogram is a visual representation to identify varia-
tions in the frequency and intensity of a signal over a period of time. In this
sense, to generate the spectrogram of an ECG signal, the STFT (Eq. 3)isused
for continuous signals due to the nature of ECGs. To represent the series of spec-
tra located in time by the STFT, the spectrogram is expressed as the squared
series of the STFT of said spectra as |X(k, l)|2.
Therefore, for the construction of the spectrogram, the power of each spec-
trum is shown segment by segment, representing the magnitudes side by side as
an image with a magnitude-dependent color map. (Fig. 4).
Fig. 4. Representation of a spectrogram of a normal signal and with FA.
6C.Garc´ıa-Aquino et al.
Instantaneous Frequency. The first moment that is extracted from a spec-
trogram is the Instantaneous Frequency (IF), which is considered as a variable
parameter in time that is related to the average of the frequencies present in the
signal as it evolves. From a probabilistic perspective [22] and [23] show that the
instantaneous frequency is the first moment or mean of the spectral density of
the signal at an instant of time. Now, considering that a complex signal can be
expressed as ˆs(t)=s(t)+s(t), where s(t) is the magnitude of the signal and
s(t) its phase, a better representation can be made for this investigation, so the
complex signal representation is rewritten as:
ˆs(t)=A(t) + expθ(t)(4)
Inferring that if the real terms of a complex signal are known or can be
calculated, then the magnitude (time) A(t) and instantaneous phase θ(t)ofthe
signal can be found as:
A(t)=s2(t)+s2(t)=|S(t)|and (5)
θ(t) = arctan(s(t)
s(t)) (6)
The phase variation with time is related to the angular frequency of the signal
and is called the instantaneous angular frequency [24], Expressed another way,
the instantaneous angular frequency is the derivative with respect to the phase
time, expressed as: d
dtθ(t)=ω(t) (7)
In the case of this investigation, it is necessary to know the frequency, instead
of the angular frequency, so the relationship between frequency and angular
frequency f=ω/2πis used, with which the instantaneous frequency of a spec-
trogram using the expression [25]:
f(t)= 1
2π
d
dtθ(t) (8)
Spectral Entropy. The second moment that is extracted from a spectrogram
is the spectral entropy (SE), which is a measure of its spectral power distri-
bution. Therefore, Spectral Entropy treats the normalized power distribution
of the signal in the frequency domain as a probability distribution and calcu-
lates the uncertainty or entropy of the spectrum [26]. Therefore, knowing the
time-frequency power spectrogram, the Spectral Entropy in time is obtained by:
SE(m)=
w
k=1
pm
klog2pm
k(9)
where again mis the window index, wis the duration of the windows and pm
k
is the Probability Mass Function (PMF) that corresponds to the m-th window,
Classification of Atrial Fibrilation 7
obtained from the power spectral density or also known as the spectrogram
(Sm(ωk))
pm
k=Sm(ωk)
w
j=1 Sm(ωj)(10)
In this way, the function pm
kis in charge of verifying the necessary condition of
the FMPs: kpm
k= 1. With the normalization carried out in (4.15), a measure
is obtained that is independent of the total power of the signal, and therefore
the SE is independent of the amplitude.
3.3 Training/Classification
The network with which we worked in this research is given by a Deep Learning
Neural Network model, specifically, a Network with Bidirectional Short and Long
Term Memory (BiLSTM). The architecture is initially formed with a sequence
input layer, a bidirectional LSTM layer (BiLSTM) proposed by [27] formed by
two LSTM hidden layers [28] to learn the bidirectional long-term dependencies
between time steps, a third fully connected layer to obtain the probabilities of
belonging to the different classes, a Softmax layer to represent the probabilities
through a categorical distribution, and finally a classification layer. The archi-
tecture diagram can be seen in Fig. 5.
Fig. 5. Bidirectional LSTM hybrid neural network.
The model has two inputs x=(x1,x
2, ..., xt) according to the two extracted
features, where tis the length of the input signal to through time. These serve
8C.Garc´ıa-Aquino et al.
as input for the BiLSTM layer, which consists of 2 hidden LSTM layers with 100
neurons each. Since a single LSTM layer can only memorize past tenses which
makes it impossible to memorize future tenses, to overcome this characteristic
deficiency, in they proposed Bidirectional Recurrent Neural Networks (BiRNN)
to be able to combine two hidden LSTM layers separated in directions opposite
but always pointing to the same exit. The internal structure of a BiLSTM layer
can be seen in Fig. 6.
Fig. 6. Internal structure of a BiLSTM layer.
With this structure, the BiLSTM layer computes the sequence of inputs
x=(x1,x
2, ..., xn) from the opposite direction to a hidden forward sequence
h=(
h1,
h2, ...,
hn) and a backward hidden sequence
h=(
h1,
h2, ...,
hn). The
encoded vector of outputs htis generated from the concatenation of the final
forward and backward outputs, ht=[
ht,
ht]. Expressing the aforementioned by
means of the following expressions.
ht=σ(Wx
hxt+W
h
h
ht1+b
h) (11)
ht=σ(Wx
hxt+W
h
h
ht+1 +b
h) (12)
ht=Wy
h
ht+Wy
h
ht+bh(13)
where h=(h1,h
2, ..., ht, ..., hn) is the output sequence of the BiLSTM layer. The
output of the BiLSTM layer serves as input data for a fully connected layer with
100 perceptron-like neurons with a sigmoidal activation function σ(·) to gener-
ate outputs bounded at [0,1], this activation function is the one that is regularly
used, however, other types of functions can be used depending on the criteria
of each researcher. The output of the fully connected layer is passed through a
softmax function to transform (normalize) these outputs to a probability distri-
bution representation such that the sum of all probabilities of the outputs is 1
Classification of Atrial Fibrilation 9
[31]. Defined in the following expression.
f(yn)= exp(yn)
K
k=1 exp(yn)(14)
Finally, there is a classification layer to determine if the output obtained
belongs to the class of signals with Atrial Fibrillation or signals with normal
beats.
4 Experimentation and Results
Computational performance and cost for FA classification are quantified and
compared using the CinC 2017 database obtained from PhysioNet. The exper-
imentation was carried out in a computer equipment that consists of an Intel
(R) Core (TM) i7-10870H CPU @ 2.20 GHz with 8 cores and 16 GB of RAM;
as well as an NVIDIA RTX 3060 GPU, with 3840 CUDA cores and 6 GB of
dedicated VRAM. The implementation was developed in MATLAB and other
experimentations with classic machine learning algorithms were carried out in
Python using the Scikit-learn library. To know the behavior of the proposed
method in the proposed Hybrid Architecture compared to other machine learn-
ing approaches, algorithms such as Nearest Neighbors, Linear SVM, RBF SVM,
Decision Tree, Random Forest, Neural Net, AdaBoost, Na¨ıve Bayes and QDA.
4.1 Metrics
In order to carry out the objective evaluation of the proposed method for the
classification of cardiac arrhythmias, 3 aspects were considered, which are men-
tioned below:
The confusion matrix was considered to evaluate the performance of a classi-
fication model, the weighting of correct and incorrect predictions are summarized
with the count values and separated by class. This set of predictions are inter-
preted through metrics derived from the confusion matrix such as: Accuracy,
Precision, Recall and F1-Score that are detailed in [32]. The Cohen’s Kappa
Score (KCS) is used to compare the observed agreement in a data set with
respect to the expected agreement as mentioned in [33]. The Mathews Cor-
relation Coefficient (MCC) is a contingency matrix method used to calculate
Pearson’s product-moment correlation coefficient between actual and predicted
values, as discussed in [34].
4.2 Results
Taking into account the signals of the data set, the division was made in a data
set for training, designating 90% and the rest in a test set. Both the training set
and the test set were augmented in order to normalize the amount of data in both
classes, and as can be seen in Table4, 4438 training instances were obtained, as
well as 490 test instances. (Table 1).
10 C. Garc´ıa-Aquino et al.
Table 1. Split signals for training and testing.
Label Data train Data test
Normal 4438 490
Atrial fibrillation 4438 490
A first experimentation was carried out using the raw time series of the
database in order to observe the classification behavior of the algorithms when
using unprocessed signals.
Table 2. Performance results with raw data.
Algorithm/Arquitecture Accuracy Precision Recall F1-Score CKS MCC
Nearest Neighbors 0.5051 0.5149 0.5051 0.4079 0.0 0.0
Linear SVM 0.4949 0.4934 0.4949 0.4646 0.0 0.0
RBF SVM 0.5 0.25 0.5 0.3333 0.0 0.0
Decision Tree 0.5582 0.5734 0.5582 0.534 0.0 0.0
Random Forest 0.5214 0.5228 0.5214 0.5143 0.0 0.0
Neural Net 0.5204 0.5529 0.5204 0.4334 0.0 0.0
AdaBoost 0.5265 0.53 0.5265 0.5125 0.0 0.0
Naive Bayes 0.5102 0.5112 0.5102 0.4994 0.0 0.0
QDA 0.5 0.25 0.5 0.3333 0.0 0.0
Proposed 0.5786 0.7000 0.5632 0.6242 0.0 0.0
The average quantitative summary for each method and metric considered
in the experimentation is presented in Table 2. From the results obtained, it is
noteworthy to observe that the hybrid model used had the best classification
performance despite being raw data, in contrast to classical machine learning
algorithms where it can be seen that in some metrics I have a performance
below 0.30, which shows that the algorithms did not reach a convergence in
training and according to the literature, the value for an implementation to be
acceptable it must be at least 0.80.
Now, for the second experimentation, the time-frequency characteristics pro-
posed in this research work were used to observe the behavior and demonstrate
an increase in the classification performance of the algorithms.
Classification of Atrial Fibrilation 11
Table 3. Performance results of the proposed classification method.
Algorithm/Arquitecture Accuracy Precision Recall F1-Score CKS MCC
Nearest Neighbors 0.8199 0.8199 0.8199 0.8199 1.0 1.0
Linear SVM 0.574 0.5794 0.574 0.5665 0.0 0.0
RBF SVM 0.5 0.25 0.5 0.3333 0.0 0.0
Decision Tree 0.6357 0.636 0.6357 0.6355 0.0 0.0
Random Forest 0.6168 0.6236 0.6168 0.6115 0.0 0.0
Neural Net 0.6724 0.757 0.6724 0.6431 0.0 0.0
AdaBoost 0.6393 0.6425 0.6393 0.6372 0.0 0.0
Naive Bayes 0.6061 0.6093 0.6061 0.6033 0.0 0.0
QDA 0.5378 0.7067 0.5378 0.419 0.0 0.0
Proposed 0.9357 0.9286 0.9420 0.9353 1.0 1.0
The average quantitative summary for each method and metric considered
in the experimentation is presented in Table 3. From the results obtained, it
is noteworthy to observe that the hybrid model used once again had the best
classification performance, surpassed even in all the metrics used the 0.90 in clas-
sification performance, in contrast to the classical machine learning algorithms
where it can be seen that most of them had a performance below 0.80, due to
the fact that the extracted features are in the time and frequency domain, are
time dependent for which these classification algorithms were not designed. In
addition to the above, it can also be verified that classical algorithms have a
particular problem known as the performance plateau, which consists in that
the greater the data load to train and evaluate said algorithms, the performance
is truncated.
As a final part of the experimentations and another of the objectives of this
research, the computational cost of each algorithm was calculated at the time of
classifying the set of tests.
Table 4. Computational cost of classification.
Algorithm/Arquitecture With raw data (in
seconds)
With the proposed
method (in seconds)
Nearest Neighbors 9.96 1.95
Linear SVM 13.99 5.27
RBF SVM 64.28 8.14
Decision Tree 0.08 0.008
Random Forest 0.08 0.009
Neural Net 0.39 0.02
AdaBoost 1.17 0.07
Naive Bayes 0.18 0.01
QDA 9.73 0.06
Proposed 6.41 0.35
12 C. Garc´ıa-Aquino et al.
As can be seen in Table4, the computational cost of the algorithms and
architectures considered was measured. The experimentation was performed by
classifying the raw test dataset and the test dataset with the applied method.
According to the results obtained, it was observed that the proposed architec-
ture had a lower computational cost compared to classical machine learning
algorithms. Although it is true that there were algorithms that seemed to have a
lower computational cost, such as the case of the Decision Tree, however, accord-
ing to the poor classification performance that can be seen in the previous table,
the malfunction of said algorithm when classifying AF is evident.
5 Conclusions
In this research work, a method for the classification of Atrial Fibrillation and Nor-
mal Beats was proposed. The results obtained showed that the correct treatment
of the signals, specifically, the use of time-frequency characteristics, improves the
training process of the classification algorithms used during the investigation, also
suggesting that the proposed Hybrid Neural Architecture obtained the best per-
formance. For the classification of arrhythmias, since although algorithms such
as k -Nearest Neighbors, the Decision Trees, despite being characterized as mul-
ticlass classification algorithms, do not manage to overcome the performance of
the Hybrid Neural Architecture proposed when analyzing ECG signals, due to the
aforementioned performance plateau that reduces their performance, which, apart
from using other types of features, another of the objectives with respect to the
previous work was to use deep learning algorithms. As future work, the implemen-
tation of the proposed method in low consumption embedded cards will be carried
out in order to conceive a portable and remote system, in addition to improving
processing times, in such a way that the system can work as close as possible to
real time.
Acknowledgments. This work was supported by the Tecnol´ogico Nacional de
exico/CENIDET trough the project entitled “Clasicador para detectar brilaci´on
auricular en se˜nales electrocardiogr´acas utilizando una red recurrente profunda entre-
nada con momentos de tiempo-frecuencia”, as well as by CONACYT.
References
1. Miyasaka, Y., Barnes, M.E., Gersh, B.J., Cha, S.S., Bailey, K.R., Abhayaratna,
W.P., et al.: Secular trends in incidence of atrial fibrillation in Olmsted County,
Minnesota, 1980 to 2000, and implications on the projections for future prevalence.
Circulation 114, 119–25 (2006)
2. Bartlett, P.L.: The sample complexity of pattern classification with neural net-
works: the size of the weights is more important than the size of the network.
IEEE Trans. Inf. Theory 44(2), 525–536 (1998)
Classification of Atrial Fibrilation 13
3. Akesson, B.M., Toivonen, H.T.: A neural network model predictive controller. J.
Process Control 16(9), 937–946 (2006)
4. Wu, X., Sui, Z., Chu, C.-H., Huang, G.: Detection of atrial fibrillation from short
ECG signals using a hybrid deep learning model. In: Chen, H., Zeng, D., Yan, X.,
Xing, C. (eds.) ICSH 2019. LNCS, vol. 11924, pp. 269–282. Springer, Cham (2019).
https://doi.org/10.1007/978-3-030- 34482-5 24
5. Sanjana, K., Sowmya, V., Gopalakrishnan, E.A., Soman, K.P.: Performance
improvement of deep residual skip convolution neural network for atrial fibrilla-
tion classification. In: Bhateja, V., Peng, S.L., Satapathy, S.C., Zhang, Y.D. (eds.)
Evolution in Computational Intelligence. AISC, vol. 1176, pp. 755–763. Springer,
Singapore (2021). https://doi.org/10.1007/978-981-15-5788-0 71
6. Tutuko, B., Nurmaini, S., Tondas, A.E., et al.: AFibNet: an implementation of
atrial fibrillation detection with convolutional neural network. BMC Med. Inform.
Decis. Mak. 21, 216 (2021). https://doi.org/10.1186/s12911-021-01571-1
7. Mousavi, S., Afghah, F., Acharya, U.R.: Han-ECG: an interpretable atrial fibril-
lation detection model using hierarchical attention networks. Comput. Biol. Med.
127, 104057 (2020)
8. Wang, R., Fan, J., Li, Y.: Deep multi-scale fusion neural network for multi-class
arrhythmia detection. IEEE J. Biomed. Health Inform. 24(9), 2461–2472 (2020)
9. Kuvaev, A., Khudorozhkov, R.: An attention-based CNN for ECG classification.
In: Arai, K., Kapoor, S. (eds.) CVC 2019. AISC, vol. 943, pp. 671–677. Springer,
Cham (2020). https://doi.org/10.1007/978-3-030- 17795-9 49
10. Wu, C., Hwang, M., Huang, T.H., et al.: Application of artificial intelligence ensem-
ble learning model in early prediction of atrial fibrillation. BMC Bioinform. 22,93
(2021). https://doi.org/10.1186/s12859-021-04000- 2
11. Kostka, P., Tkacz, E.: Support vector machine classifier with feature extraction
stage as an efficient tool for atrial fibrillation detection improvement. In: Kurzynski,
M., Puchala, E., Wozniak, M., Zolnierek, A. (eds.) Computer Recognition Systems
2. ASC, vol. 45, pp. 356–363. Springer, Heidelberg (2007). https://doi.org/10.1007/
978-3-540-75175-5 45
12. Kisohara, M., Masuda, Y., Yuda, E., et al.: Optimal length of R-R interval seg-
ment window for Lorenz plot detection of paroxysmal atrial fibrillation by machine
learning. Biomed. Eng. Online 19, 49 (2020). https://doi.org/10.1186/s12938-020-
00795-y
13. Hickey, B., Heneghan, C., De Chazal, P.: Non-episode-dependent assessment of
paroxysmal atrial fibrillation through measurement of RR interval dynamics and
atrial premature contractions. Ann. Biomed. Eng. 32, 677–687 (2004). https://doi.
org/10.1023/B:ABME.0000030233.39769.a4
14. Mandal, S., Sinha, N.: Prediction of atrial fibrillation based on nonlinear modeling
of heart rate variability signal and SVM classifier. Res. Biomed. Eng. 37, 725–736
(2021). https://doi.org/10.1007/s42600-021-00175- y
15. Wang, J., Wang, P., Wang, S.: Automated detection of atrial fibrillation in ECG
signals based on wavelet packet transform and correlation function of random pro-
cess. Biomed. Sig. Process. Control 55, 101662 (2020)
16. Mousavi, S., Afghah, F., Khadem, F., Acharya, U.R.: ECG language processing
(ELP): a new technique to analyze ECG signals. Comput. Methods Programs
Biomed. 202, 105959 (2021)
17. Cao, X.-C., Yao, B., Chen, B.-Q.: Atrial fibrillation detection using an improved
multiscale decomposition enhanced residual convolutional neural network. IEEE
Access 7, 89152–89161 (2019)
14 C. Garc´ıa-Aquino et al.
18. Garc´ıa-Aquino, C., ujica-Vargas, D., Matuz-Cruz, M.: Classification of cardiac
arrhythmias using machine learning algorithms. In: Mata-Rivera, M.F., Zagal-
Flores, R. (eds.) WITCOM 2021. CCIS, vol. 1430, pp. 174–185. Springer, Cham
(2021). https://doi.org/10.1007/978-3-030- 89586-0 14
19. Vogt, N.: CNNs, LSTMs, and attention networks for pathology detection in medical
data (2019). arXiv preprint arXiv:1912.00852
20. Smith, J. O.: Mathematics of the Discrete Fourier Transform (DFT). W3K Pub-
lishing (2007). www.w3k.org/books/
21. Goldberger, A.L., et al.: PhysioBank, PhysioToolkit, and PhysioNet. Circulation
101(23) (2000)
22. Flandrin, P.: Time-frequency/time-scale analysis (1998)
23. Barnes, A. E.: Instantaneous spectral bandwidth and dominant frequency with
applications to seismic reflection data (1993)
24. Taner, M.T., Koehler, F., Sheriff, R.: Complex seismic trace analysis. Geophysics
44(6), 1041–1063 (1979)
25. Boashash, B.: Estimating and interpreting the instantaneous frequency of a signal.
i. fundamentals. Proc. IEEE 80(4), 520–538 (1992)
26. Pan, Y.N., Chen, J., Li, X.L.: Spectral entropy: a complementary index for rolling
element bearing performance degradation assessment. Proc. Inst. Mech. Eng. C J.
Mech. Eng. Sci. 223(5), 1223–1231 (2008)
27. Schuster, M., Paliwal, K.K.: Bidirectional recurrent neural networks. IEEE Trans.
Sig. Process. 45(11), 2673–2681 (1997)
28. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8),
1735–1780 (1997)
29. Elman, J.: Language as a dynamical system (2001)
30. Pattanayak, S.: Pro Deep Learning with TensorFlow. Apress, New York (2017)
31. Svens´en, M., Bishop, C. M.: Pattern recognition and machine learning (2007)
32. Chen, H., et al.: GasHis-transformer: a multi-scale Visual Transformer approach
for gastric histopathology image classification (2021). arXiv:2104.14528
33. Samiuc. www.samiuc.es/estadisticas-variables-binarias/medidas-de-concordancia/
kappa-de-cohen/. Accessed 05 July 2021
34. Chicco, D., Jurman, G.: The advantages of the Matthews correlation coefficient
(MCC) over F1 score and accuracy in binary classification evaluation. BMC
Genom. 21(1), 6 (2020)
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
Background Atrial fibrillation is a paroxysmal heart disease without any obvious symptoms for most people during the onset. The electrocardiogram (ECG) at the time other than the onset of this disease is not significantly different from that of normal people, which makes it difficult to detect and diagnose. However, if atrial fibrillation is not detected and treated early, it tends to worsen the condition and increase the possibility of stroke. In this paper, P-wave morphology parameters and heart rate variability feature parameters were simultaneously extracted from the ECG. A total of 31 parameters were used as input variables to perform the modeling of artificial intelligence ensemble learning model. Results This paper applied three artificial intelligence ensemble learning methods, namely Bagging ensemble learning method, AdaBoost ensemble learning method, and Stacking ensemble learning method. The prediction results of these three artificial intelligence ensemble learning methods were compared. As a result of the comparison, the Stacking ensemble learning method combined with various models finally obtained the best prediction effect with the accuracy of 92%, sensitivity of 88%, specificity of 96%, positive predictive value of 95.7%, negative predictive value of 88.9%, F1 score of 0.9231 and area under receiver operating characteristic curve value of 0.911. Conclusion In feature extraction, this paper combined P-wave morphology parameters and heart rate variability parameters as input parameters for model training, and validated the value of the proposed parameters combination for the improvement of the model’s predicting effect. In the calculation of the P-wave morphology parameters, the hybrid Taguchi-genetic algorithm was used to obtain more accurate Gaussian function fitting parameters. The prediction model was trained using the Stacking ensemble learning method, so that the model accuracy had better results, which can further improve the early prediction of atrial fibrillation.
Chapter
Full-text available
This article proposes a method to classify cardiac arrhythmias using feature extraction and dimensionality reduction techniques. The experiment was carried out with the QRS complexes of the electrocardiographic signals, which are part of the Physionet MIT-BIH arrhythmia database. The machine learning algorithms used to perform the classification were k Nearest Neighbors, Linear SVM, RBF SVM, Decision Tree, Random Forest, Neural Net, AdaBoost, Naive Bayes and QDA. To measure the efficiency and quality of the proposed method, the metrics of Accuracy, Precision, Recall, F1 Score, as well as the Cohen Kappa score and the Mathews correlation coefficient were used. The results obtained show a better classification performance in the neural network with 96.33%, 96.33%, 96.33%, 96.32%, 1.0 and 1.0 of the aforementioned metrics.
Article
Full-text available
Background Generalization model capacity of deep learning (DL) approach for atrial fibrillation (AF) detection remains lacking. It can be seen from previous researches, the DL model formation used only a single frequency sampling of the specific device. Besides, each electrocardiogram (ECG) acquisition dataset produces a different length and sampling frequency to ensure sufficient precision of the R–R intervals to determine the heart rate variability (HRV). An accurate HRV is the gold standard for predicting the AF condition; therefore, a current challenge is to determine whether a DL approach can be used to analyze raw ECG data in a broad range of devices. This paper demonstrates powerful results for end-to-end implementation of AF detection based on a convolutional neural network (AFibNet). The method used a single learning system without considering the variety of signal lengths and frequency samplings. For implementation, the AFibNet is processed with a computational cloud-based DL approach. This study utilized a one-dimension convolutional neural networks (1D-CNNs) model for 11,842 subjects. It was trained and validated with 8232 records based on three datasets and tested with 3610 records based on eight datasets. The predicted results, when compared with the diagnosis results indicated by human practitioners, showed a 99.80% accuracy, sensitivity, and specificity. Result Meanwhile, when tested using unseen data, the AF detection reaches 98.94% accuracy, 98.97% sensitivity, and 98.97% specificity at a sample period of 0.02 seconds using the DL Cloud System. To improve the confidence of the AFibNet model, it also validated with 18 arrhythmias condition defined as Non-AF-class. Thus, the data is increased from 11,842 to 26,349 instances for three-class, i.e., Normal sinus (N), AF and Non-AF. The result found 96.36% accuracy, 93.65% sensitivity, and 96.92% specificity. Conclusion These findings demonstrate that the proposed approach can use unknown data to derive feature maps and reliably detect the AF periods. We have found that our cloud-DL system is suitable for practical deployment
Article
Full-text available
Background: A language is constructed of a finite/infinite set of sentences composing of words. Similar to natural languages, the Electrocardiogram (ECG) signal, the most common noninvasive tool to study the functionality of the heart and diagnose several abnormal arrhythmias, is made up of sequences of three or four distinct waves, including the P-wave, QRS complex, T-wave, and U-wave. An ECG signal may contain several different varieties of each wave (e.g., the QRS complex can have various appearances). For this reason, the ECG signal is a sequence of heartbeats similar to sentences in natural languages) and each heartbeat is composed of a set of waves (similar to words in a sentence) of different morphologies. Methods: Analogous to natural language processing (NLP), which is used to help computers understand and interpret the human’s natural language, it is possible to develop methods inspired by NLP to aid computers to gain a deeper understanding of Electrocardiogram signals. In this work, our goal is to propose a novel ECG analysis technique, ECG language processing (ELP), focusing on empowering computers to understand ECG signals in a way physicians do. Results: We evaluated the proposed approach on two tasks, including the classification of heartbeats and the detection of atrial fibrillation in the ECG signals. Overall, our technique resulted in better performance or comparable performance with smaller neural networks compared to other deep neural networks and existing algorithms. Conclusion: Experimental results on three databases (i.e., PhysioNet’s MIT-BIH, MIT-BIH AFIB, and PhysioNet Challenge 2017 AFIB Dataset databases) reveal that the proposed approach as a general idea can be applied to a variety of biomedical applications and can achieve remarkable performance.
Article
Full-text available
Background: Heartbeat interval Lorenz plot (LP) imaging is a promising method for detecting atrial fibrillation (AF) in long-term monitoring, but the optimal segment window length for the LP images is unknown. We examined the performance of AF detection by LP images with different segment window lengths by machine learning with convolutional neural network (CNN). LP images with a 32 × 32-pixel resolution of non-overlapping segments with lengths between 10 and 500 beats were created from R-R intervals of 24-h ECG in 52 patients with chronic AF and 58 non-AF controls as training data and in 53 patients with paroxysmal AF and 52 non-AF controls as test data. For each segment window length, discriminant models were made by fivefold cross-validation subsets of the training data and its classification performance was examined with the test data. Results: In machine learning with the training data, the averages of cross-validation scores were 0.995 and 0.999 for 10 and 20-beat LP images, respectively, and > 0.999 for 50 to 500-beat images. The classification of test data showed good performance for all segment window lengths with an accuracy from 0.970 to 0.988. Positive likelihood ratio for detecting AF segments, however, showed a convex parabolic curve linear relationship to log segment window length and peaked at 85 beats, while negative likelihood ratio showed monotonous increase with increasing segment window length. Conclusions: This study suggests that the optimal segment window length that maximizes the positive likelihood ratio for detecting paroxysmal AF with 32 × 32-pixel LP image is 85 beats.
Article
Full-text available
Automated electrocardiogram (ECG) analysis for arrhythmia detection plays a critical role in early prevention and diagnosis of cardiovascular diseases. Extracting powerful features from raw ECG signals for fine-grained diseases classification is still a challenging problem today due to variable abnormal rhythms and noise distribution. For ECG analysis, the previous research works depend mostly on heartbeat or single scale signal segments, which ignores underlying complementary information of different scales. In this paper, we formulate a novel end-to-end Deep Multi-Scale Fusion convolutional neural network (DMSFNet) architecture for multi-class arrhythmia detection. Our proposed approach can effectively capture abnormal patterns of diseases and suppress noise interference by multi-scale feature extraction and cross-scale information complementarity of ECG signals. The proposed method implements feature extraction for signal segments with different sizes by integrating multiple convolution kernels with different receptive fields. Meanwhile, joint optimization strategy with multiple losses of different scales is designed, which not only learns scale-specific features, but also realizes cumulatively multi-scale complementary feature learning during the learning process. In our work, we demonstrate our DMSFNet on two open datasets (CPSC_2018 and PhysioNet/CinC_2017) and deliver the state-of-art performance on them. Among them, CPSC_2018 is a 12-lead ECG dataset and CinC_2017 is a single-lead dataset. For these two datasets, we achieve the F1 score 82.8% and 84.1% which are higher than previous state-of-art approaches respectively. The results demonstrate that our end-to-end DMSFNet has outstanding performance for feature extraction from a broad range of distinct arrhythmias and elegant generalization ability for effectively handling ECG signals with different leads.
Article
In this paper, a multi-scale visual transformer model, referred as GasHis-Transformer, is proposed for Gastric Histopathological Image Detection (GHID), which enables the automatic global detection of gastric cancer images. GasHis-Transformer model consists of two key modules designed to extract global and local information using a position-encoded transformer model and a convolutional neural network with local convolution, respectively. A publicly available hematoxylin and eosin (H&E) stained gastric histopathological image dataset is used in the experiment. Furthermore, a Dropconnect based lightweight network is proposed to reduce the model size and training time of GasHis-Transformer for clinical applications with improved confidence. Moreover, a series of contrast and extended experiments verify the robustness, extensibility and stability of GasHis-Transformer. In conclusion, GasHis-Transformer demonstrates high global detection performance and shows its significant potential in GHID task.
Article
PurposeCardiac arrhythmia is one of the major causes of death worldwide. Atrial fibrillation (AF) is considered as the most prevalent sustained cardiac arrhythmia. It increases the risk of cardiac stroke and heart failure. This study aims to present an automated technique for AF detection by analyzing the ECG signal so that individual heart condition can be monitored accurately and an alarm system can be simulated if any serious cardiac abnormality occurs.Methods The heart rate variability (HRV) signal reflects the fluctuation of heart in different time intervals. The proposed algorithm includes nonlinear methods for characterizing the dynamics of HRV signal to find diagnosis pattern for AF detection. The diagnostically relevant nonlinear parameters are extracted from HRV signal. The extracted features are subjected to decision tree and support vector machine (SVM) classifier to discriminate AF from normal heart condition.ResultsThe experimental result is evaluated on 25 ECG data set of AF and 54 ECG data sets of normal subjects taken from Physionet database to illustrate the diagnostic ability of the classifiers. The tenfold cross-validation method is also applied for performance evaluation. The proposed algorithm has achieved an average accuracy of 99.11%, sensitivity, specificity, and F-score values of 98.92%, 99.25%, and 99.08%, respectively, using SVM classifier which is better than the result obtained from decision tree classifier having average accuracy of 96.41% and F-score of 95.71%.Conclusion The proposed algorithm provides great potential for AF diagnosis with high accuracy. This work yields superior performance based on the comparative study with the existing scientific approaches to categorize AF from normal ones.
Article
Atrial fibrillation (AF) is one of the most prevalent cardiac arrhythmias that affects the lives of many people around the world and is associated with a five-fold increased risk of stroke and mortality. Like other problems in the healthcare domain, artificial intelligence (AI)-based models have been used to detect AF from patients’ ECG signals. The cardiologist level performance in detecting this arrhythmia is often achieved by deep learning-based methods, however, they suffer from the lack of interpretability. In other words, these approaches are unable to explain the reasons behind their decisions. The lack of interpretability is a common challenge toward a wide application of machine learning (ML)-based approaches in the healthcare which limits the trust of clinicians in such methods. To address this challenge, we propose HAN-ECG, an interpretable bidirectional-recurrent-neural-network-based approach for the AF detection task. The HAN-ECG employs three attention mechanism levels to provide a multi-resolution analysis of the patterns in ECG leading to AF. The detected patterns by this hierarchical attention model facilitate the interpretation of the neural network decision process in identifying the patterns in the signal which contributed the most to the final detection. Experimental results on two AF databases demonstrate that our proposed model performs better than the existing algorithms. Visualization of these attention layers illustrates that our proposed model decides upon the important waves and heartbeats which are clinically meaningful in the detection task (e.g., absence of P-waves, and irregular R-R intervals for the AF detection task).
Chapter
Sanjana K.Sowmya, V.Gopalakrishnan, E. A.Soman, K. P.Atrial fibrillation is a life-threatening cardiac disease which requires a long and tedious process of detection. So, the detection of atrial fibrillation has gained great importance. One of the most reliable ways to detect cardiac disease is through analysis of ECG signal. In this paper, we show that the performance of a deep residual skip convolution neural network-based approach for automatic detection of atrial fibrillation can be improved by hyperparameter tuning. For the present work, atrial fibrillation dataset from the 2017 PhysioNet/CinC Challenge is used. The proposed method obtained an overall accuracy of 96.08% and weighted average F1 score of 0.96, a recall of 0.96 and a precision of 0.96. The main advantage of the present work is the improved accuracy achieved using a lighter model which is trained for a lesser number of epochs.