Content uploaded by Dante Mújica-Vargas
All content in this area was uploaded by Dante Mújica-Vargas on Sep 19, 2022
Content may be subject to copyright.
Implementation of Time-Frequency
Moments for the Classiﬁcation of Atrial
Fibrillation Sequences Through
a Bidirectional Long-Short Term Memory
Christian Garc´ıa-Aquino1, Dante M´ujica-Vargas1(B
Manuel Matuz-Cruz2, Nimrod Gonzalez-Franco1,
and Gabriel Gonz´alez-Serna1
1Tecnol´ogico Nacional de M´exico, CENIDET, Cuernavaca, Mexico
2Tecnol´ogico Nacional de M´exico, Campus Tapachula, Tapachula, Mexico
Abstract. This article proposes a method to classify atrial ﬁbrillation
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 classiﬁcation experiments. To measure
the eﬃciency 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 coeﬃcient. The results obtained show
a better classiﬁcation 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 ﬁbrillation ·Feature extraction ·BiLSTM ·
Time-frequency ·ECG ·PhysioNet
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 suﬀers from some anomaly. Such is the case that
studies have been carried out focused on the classiﬁcation of Atrial Fibrillation
(AF), this being one of the most common types of arrhythmias .
In this sense, the use of deep learning has become popular for its classiﬁca-
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
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.
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 ﬁeld 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 classiﬁca-
In the literature, there are approaches to AF classiﬁcation using LSTM con-
volutional neural networks (CNN-LSTM) , deep residual-jump convolutional
neural networks , one-dimensional convolutional neural networks (1D-CNN)
, Hierarchical Attention Networks (HAN) , Multiscale Fusion Neural Net-
works (DMSFNet)  and Deep Neural Networks with attention mechanisms .
As for classical learning algorithms, there are approaches using AdaBoost 
and Support Vector Machines (SVM) .
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) , the use of the random process correlation function , ECG
language processing , the decomposition of the signal in multiple scales ,
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 ﬁeld of AF. However, the use of hybrid neural
networks may give the impression of oﬀering good classiﬁcation performance, but
by not employing signiﬁcant 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 speciﬁed since the nature of ECG data
is time dependent and such property cannot be exploited in depth.
There is a previous work where the classiﬁcation of arrhythmias was car-
ried out by extracting artisanal features using the wavelet packet transform and
classifying them with classical machine learning algorithms . 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 eﬃcient 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 classiﬁcation algorithms
used during the experimentation. The method of implementation for the classi-
ﬁcation 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 ﬁnal section and future work is described.
Classiﬁcation of Atrial Fibrilation 3
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 . 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 xt−1,xtand xt+1 are the inputs of the
RNN model at diﬀerent instants of time. (Fig. 1).
Fig. 1. Basic structure of an RNN .
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(h[t−1] + bh)) (1)
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 .
Mathematically, it is written as:
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.
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 classiﬁcation is performed with machine learning
algorithms. A description of the aforementioned can be seen in Fig 2.
Fig. 2. Proposed classiﬁcation method
3.1 Data Acquisition/Segmentation
For the experimentation of this research, the ECG data of the PhysioNet 2017
Challenge  were used, which consist of a set of ECG signals sampled 300Hz
and divided by a group of experts, which are classiﬁed 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 classiﬁcation
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.
Classiﬁcation 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 speciﬁc character-
istics such as the Time-Frequency moments, which for the work in question was
considered the ﬁrst moment as the Frequency Instantaneous and the second as
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 ﬁrst 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  and  show that the
instantaneous frequency is the ﬁrst 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:
θ(t) = arctan(s∗(t)
The phase variation with time is related to the angular frequency of the signal
and is called the instantaneous angular frequency , Expressed another way,
the instantaneous angular frequency is the derivative with respect to the phase
time, expressed as: d
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 :
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 . Therefore, knowing the
time-frequency power spectrogram, the Spectral Entropy in time is obtained by:
where again mis the window index, wis the duration of the windows and pm
is the Probability Mass Function (PMF) that corresponds to the m-th window,
Classiﬁcation of Atrial Fibrilation 7
obtained from the power spectral density or also known as the spectrogram
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.
The network with which we worked in this research is given by a Deep Learning
Neural Network model, speciﬁcally, 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  formed by
two LSTM hidden layers  to learn the bidirectional long-term dependencies
between time steps, a third fully connected layer to obtain the probabilities of
belonging to the diﬀerent classes, a Softmax layer to represent the probabilities
through a categorical distribution, and ﬁnally a classiﬁcation 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
deﬁciency, 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
2, ..., xn) from the opposite direction to a hidden forward sequence
h2, ..., −→
hn) and a backward hidden sequence ←−
h2, ..., ←−
encoded vector of outputs htis generated from the concatenation of the ﬁnal
forward and backward outputs, ht=[
ht]. Expressing the aforementioned by
means of the following expressions.
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
Classiﬁcation of Atrial Fibrilation 9
. Deﬁned in the following expression.
Finally, there is a classiﬁcation layer to determine if the output obtained
belongs to the class of signals with Atrial Fibrillation or signals with normal
4 Experimentation and Results
Computational performance and cost for FA classiﬁcation are quantiﬁed 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.
In order to carry out the objective evaluation of the proposed method for the
classiﬁcation of cardiac arrhythmias, 3 aspects were considered, which are men-
The confusion matrix was considered to evaluate the performance of a classi-
ﬁcation 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 . 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 . The Mathews Cor-
relation Coeﬃcient (MCC) is a contingency matrix method used to calculate
Pearson’s product-moment correlation coeﬃcient between actual and predicted
values, as discussed in .
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 ﬁbrillation 4438 490
A ﬁrst experimentation was carried out using the raw time series of the
database in order to observe the classiﬁcation 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 classiﬁcation
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 classiﬁcation performance of the algorithms.
Classiﬁcation of Atrial Fibrilation 11
Table 3. Performance results of the proposed classiﬁcation 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
classiﬁcation performance, surpassed even in all the metrics used the 0.90 in clas-
siﬁcation 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 classiﬁcation algorithms were not designed. In
addition to the above, it can also be veriﬁed 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
As a ﬁnal 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 classiﬁcation.
Algorithm/Arquitecture With raw data (in
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 classiﬁcation performance that can be seen in the previous table,
the malfunction of said algorithm when classifying AF is evident.
In this research work, a method for the classiﬁcation of Atrial Fibrillation and Nor-
mal Beats was proposed. The results obtained showed that the correct treatment
of the signals, speciﬁcally, the use of time-frequency characteristics, improves the
training process of the classiﬁcation algorithms used during the investigation, also
suggesting that the proposed Hybrid Neural Architecture obtained the best per-
formance. For the classiﬁcation of arrhythmias, since although algorithms such
as k -Nearest Neighbors, the Decision Trees, despite being characterized as mul-
ticlass classiﬁcation 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
Acknowledgments. This work was supported by the Tecnol´ogico Nacional de
M´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.
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 ﬁbrillation 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 classiﬁcation 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)
Classiﬁcation 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 ﬁbrillation 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 ﬁbrilla-
tion classiﬁcation. 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 ﬁbrillation 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 ﬁbril-
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 classiﬁcation.
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 artiﬁcial intelligence ensem-
ble learning model in early prediction of atrial ﬁbrillation. BMC Bioinform. 22,93
(2021). https://doi.org/10.1186/s12859-021-04000- 2
11. Kostka, P., Tkacz, E.: Support vector machine classiﬁer with feature extraction
stage as an eﬃcient tool for atrial ﬁbrillation 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/
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 ﬁbrillation by machine
learning. Biomed. Eng. Online 19, 49 (2020). https://doi.org/10.1186/s12938-020-
13. Hickey, B., Heneghan, C., De Chazal, P.: Non-episode-dependent assessment of
paroxysmal atrial ﬁbrillation through measurement of RR interval dynamics and
atrial premature contractions. Ann. Biomed. Eng. 32, 677–687 (2004). https://doi.
14. Mandal, S., Sinha, N.: Prediction of atrial ﬁbrillation based on nonlinear modeling
of heart rate variability signal and SVM classiﬁer. 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 ﬁbrillation 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 ﬁbrillation 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., M´ujica-Vargas, D., Matuz-Cruz, M.: Classiﬁcation 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
22. Flandrin, P.: Time-frequency/time-scale analysis (1998)
23. Barnes, A. E.: Instantaneous spectral bandwidth and dominant frequency with
applications to seismic reﬂection data (1993)
24. Taner, M.T., Koehler, F., Sheriﬀ, 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),
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 classiﬁcation (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 coeﬃcient
(MCC) over F1 score and accuracy in binary classiﬁcation evaluation. BMC
Genom. 21(1), 6 (2020)