# Learning ECG signal features without backpropagation

Péter Pósfay<EMAIL_ADDRESS>Marcell T. Kurbucz
<EMAIL_ADDRESS>Péter Kovács<EMAIL_ADDRESS>Antal Jakovác
<EMAIL_ADDRESS>
###### Abstract

Representation learning has become a crucial area of research in machine
learning, as it aims to discover efficient ways of representing raw data with
useful features to increase the effectiveness, scope and applicability of
downstream tasks such as classification and prediction. In this paper, we
propose a novel method to generate representations for time series-type data.
This method relies on ideas from theoretical physics to construct a compact
representation in a data-driven way, and it can capture both the underlying
structure of the data and task-specific information while still remaining
intuitive, interpretable and verifiable. This novel methodology aims to
identify linear laws that can effectively capture a shared characteristic
among samples belonging to a specific class. By subsequently utilizing these
laws to generate a classifier-agnostic representation in a forward manner,
they become applicable in a generalized setting. We demonstrate the
effectiveness of our approach on the task of ECG signal classification,
achieving state-of-the-art performance.

###### keywords:

ECG classification , linear law , representation learning , outlier detection
, machine learning

††journal: arXiv

[label1]organization=Department of Computational Sciences, Wigner Research
Centre for Physics, addressline=29-33 Konkoly-Thege Miklós Street,
city=Budapest, postcode=H-1121, country=Hungary

[label2]organization=Corvinus University of Budapest, Institute of Data
Analytics and Information Systems, addressline=8 Fővám Square, city=Budapest,
postcode=H-1093, country=Hungary

[label3]organization=Department of Numerical Analysis, Eötvös Loránd
University, addressline=1/c. Pázmány Péter sétány, city=Budapest,
postcode=H-1117, country=Hungary

##  1 Introduction

The efficiency of any machine learning system is heavily dependent on how the
data are input into the system [1]. The best representation of any given
information depends on the task at hand and can change dynamically over time.
For this reason, much effort has been dedicated to transforming data into an
appropriate form during the development of machine learning applications. One
way to optimize data representations is to employ feature engineering methods
that transform the data in advance, making them more suitable for machine
learning algorithms. Although the resulting systems can experience large
performance boosts from such optimization approaches, there are a few
drawbacks to this procedure. Since these data preprocessing methods are
designed by humans, they often reflect naive intuitions about the structure of
the information in the data and about the task to be automatized. This results
in less generalizable systems because they cannot fine-tune their inner data
representations, which are manually determined. Another problem is that this
process becomes labor intensive and less effective as the volume and variation
of the data increase [1]. These shortcomings are among the main reasons why
finding new ways to automatize data preprocessing and feature generation is
the main focus in many areas of machine learning.

To extend the scope and increase the data efficiency of intelligent algorithms
[2], it is important to increase their ability to extract and organize useful
information from the data presented. As machine learning starts to address
increasingly complex tasks, it will become necessary to increase a system’s
ability to internally organize data and dynamically learn the correct
representations. This line of thought has led to breakthrough results in many
areas of machine learning, such as speech recognition [3, 4, 5, 6] and image
recognition [7]. The idea of allowing an algorithm to represent information in
a hierarchical way has also led to outstanding results in natural language
processing [8, 9].

In this paper, we present a new technique for generating useful features from
time series data that we apply to the task of electrocardiogram (ECG) signal
classification. The main advantage of this technique is that it learns
representations in a data-driven way; however, it is distinct and separate
from a classification algorithm. The idea behind this new method originates
from the connection between representation learning and physics. The aim of
representation learning is to disentangle the multitude of underlying factors
within the data to generate more abstract representations [1]. This idea is
very similar in nature to the renormalization idea in physics [10, 11, 12],
where the underlying physical processes have to be disentangled in observed
quantities. This similarity can be exploited to aid in representation learning
using techniques from theoretical physics [13, 14].

This technique approaches the question of data representation from the
renormalization point of view and determines relevant and irrelevant
underlying factors to aid in the disentangling process [15]. When relevant
factors are identified, a new representation of the data can be generated,
providing a more concise and abstract description of the information. Linear
law-based feature space transformation (LLT) has been shown to be a successful
technique for extracting relevant factors from time series data [16, 17, 18,
19].

The idea of linear laws originates from the conservation laws of physics,
which are quantities that remain constant in an observed system and can be
used to greatly simplify calculations. In the data science context, laws mean
relations that are true for all elements of a learning set. Analogously to
physics, these relations are "conserved" within the learning set, and they are
true for every element. The challenge is to generate these laws automatically
from the dataset while introducing as few assumptions about the nature of the
dataset as possible. The nature of linear laws dictates that these relations
must be determined for classes in the learning set, and they characterize the
samples in a general way, as they represent a property that is common in all
elements of a given class. Because data representation is task-oriented, this
step requires the tuning of hyperparameters by the user to obtain a suitable
representation for a given goal. Hence, fitting linear laws is more similar to
applying machine learning methods than data preprocessing and feature
engineering.

A linear law-based approach has many positive properties that make it very
versatile. First, feature generation is data-driven. This means that without
specifying any method for classification, it is possible to check what kind of
separation is supported by the data. The parameters of linear laws provide
information about the level of support a given classification receives from
the data [16, 17]. It can be, for example, that signals that have the same
label are not as similar to each other as previously thought. This is
indicated by the accuracy of the linear law derived from them.

Another advantage of linear laws is that they can automatically find
representations while not requiring any supervised learning method. The laws
are ’derived’ from the data in a forward way.

With this technique, the feature generation process becomes more distinct from
the classification algorithm, and many classifiers can be used for the same
feature set. This improves the interpretability because it is possible to
follow how a feature was generated and how it influenced the categorization in
a given sample and classifier. This property can be especially important in
medical applications where verifiability is key [20].

The separation of the classifier and the feature generator also makes it
possible to study the behavior of different classifier algorithms for the same
transformed space. In this context, the difference between these cases will
provide information about the generalizability of each method compared to that
of others. From this information, the best method can be chosen.
Alternatively, as these algorithms all work in the same feature space, it is
possible to combine them in various ways to provide more generality.

The new technique presented in this paper can be summarized as follows. First,
linear laws are learned (fitted) for each class in the learning set. These
laws describe the underlying factors that define each set in the context of
the dataset. Then, the laws are used to transform the data into a new
representation that has better features for classification. This
transformation builds on previous results obtained by linear laws [16, 17] but
introduces a new feature generation method to accommodate the spike-like
nature of ECG signals. The classification algorithms are then trained in the
transformed feature space.

This paper is organized as follows. First, in Section 2, an outlook is given
on ECG signal classification. Then, in Section 3, the mathematical description
of linear laws for time series is given, and a method for finding linear laws
is explained. In Section 4, the ECG dataset used for testing the method is
presented. The classification algorithm used to derive the results is
described in Section 5. The results are presented in Section 6.

##  2 ECG classification

There is a long history of computer-assisted analysis of electrocardiograms
[21], and there it is still a very active research field due to the ever-
increasing amount of data. In fact, new data acquisition technologies [22],
such as IoT, wearable devices, and smart devices, have paved the way for
commercial applications of ECG monitoring. A massive amount of data is
generated by these devices and must be stored, processed, and interpreted. A
common aspect of these challenges is the extraction of features that encode
medical information and discard nonmeaningful parts of the data, such as
noise. This can be achieved manually via feature engineering and/or
automatically via representation learning [23, 24]. The former approach
produces static handcrafted features based on human intuition, whereas the
latter learns explanatory factors directly from the training data.

A clinical workflow must rely on transparent and interpretable decisions. This
favors the use of handcrafted features that fuse medical knowledge with signal
processing expertise. Temporal and statistical features, such as RR distances,
ECG intervals, and moment-based indices, are typical examples that are
reviewed in detail by [21, 25]. Furthermore, the shape features of the basic
ECG waveforms (QRS, T, P) belong to the morphological category, and their
global changes are of great importance in the field of arrhythmia detection
[26], which is the main objective in this section.

There are various ways to extract morphological features from ECGs. For
instance, time-domain approaches usually operate with direct signal samples
from ECGs [27] and computed measurements such as power, derivative, and
extreme values [28]. These time-domain features are especially prone to noise;
thus, the feature extraction step is often performed in the frequency domain
instead. Spectral approaches (e.g., linear filtering) assume at least weak
stationarity of the analyzed signal, which is not true in the case of ECG, as
it is influenced by many physiological factors, such as respiration, body
movement, and arrhythmia. To address this nonstationary behavior, a number of
joint time-frequency representations have been introduced, such as the short-
time Fourier transform, Choi–Williams distribution, and multiwindow
spectrogram [29]. In contrast to the previously mentioned methods, the so-
called wavelet transformation employs time windows with variable widths that
allow better temporal and spectral localization of the nonstationary signal
features. This property makes wavelets very popular in the field of ECG signal
processing [30].

Although there is a wide range of joint time-frequency representations, the
building atoms (e.g., the window function and the mother wavelets) are fixed a
priori to a given application. This can be restrictive in the case of ECG
signal processing, where morphological features can vary over time and between
subjects. To overcome this limitation, adaptive data-driven transformations
have been introduced. These methods represent an ECG as a series of basic
functions that are optimal in some sense. Variable projections by means of
parameterized basis functions, such as Hermite, spline, and rational
functions, provide optimal representations of the data in a least-square sense
[31, 32]. In contrast, PCA is a statistical approach that transforms the data
along variance-maximizing orthogonal directions [33]. Independent component
analysis (ICA) is another technique originating from blind source separation
[34], finding a projection that maximizes higher-order statistics, such as
kurtosis. In general, the proposed LLT method is similar in the sense that a
set of independent vectors is determined from the input data. The optimality
criteria (5) of the LLT method is, however, essentially different since it
favors the direction along which the time-embedded samples change the least.
This results in a feature space with increased separability, which will be
demonstrated in a case study of ECG classification.

##  3 Mathematical background

Here, we briefly summarize the mathematical results needed for understanding
linear laws and for implementing the LLT-type transformation used for ECG
signals [16, 17, 35, 15].

Let us first consider a times series $y:\,\mathbb{R}\rightarrow\mathbb{V}$,
where $\mathbb{V}$ is a finite-dimensional Hilbert space. In practice, we
always work with finite-dimensional representatives, and here, we assume that
a faithful finite-dimensional representation of a time series is already
given. In this case, we can prepare a finite set of $n$-length samplings from
this time series:

$\mathcal{Y}=\left\\{Y^{(k)}\in\mathbb{V}^{n+1}\>|\>Y_{i}^{(k)}=y(t_{k}-i\Delta
t),\>i\in\\{0,\dots,n\\},\>k\in\\{n,\dots,K\\}\right\\},$ (1)

where $K,n\in\mathbb{N}$, $\Delta t$ is the sampling interval of the time
series and $y(t_{k})$ is the value of the time series at time $t_{k}$. This is
referred to as the time delay embedding of the time series, and it is
sufficient to capture the dynamic state of the system [36, 37].

The set of $t_{k}$ values that form the base points corresponding to the
$n$-length samplings can be chosen in any suitable way depending on the given
application. Here, we always choose the maximum number of possible base
points, which results in maximally overlapping $n$-length samplings. This
means that there are $n$-length time embeddings of the time series; hence,
$n\leqq\text{min}(k)$. For a time series of length $L$, this time embedding
creates $L-n+1$ time series subsamples of length $n$, where two consecutive
elements maximally overlap, meaning that the second element contains all the
elements of the first element except the first $n-1$ elements of the first
element.

###  3.1 Linear laws

Let us first consider mappings of the following type:

$\mathcal{F}:\>\mathbb{V}^{n+1}\rightarrow\mathbb{R},\quad\mathcal{F}\left(Y^{(k)}\right)=0,\quad\forall\>k.\quad$
(2)

In this study, we only consider linear mappings. This assumption constrains
the form of $\mathcal{F}$ in Eq. (2). For convenience, we introduce the matrix
notation for the embedded time series $Y_{i}^{(k)}$ from Eq. (1):

$Y_{ki}=Y^{k}_{i}=y(t_{k}-i\Delta t).$ (3)

Using this notation, the linear mapping $\mathcal{F}$ can be written as:

$\mathcal{F}(Y^{k})=\sum_{i=0}^{n}Y_{ki}w_{i}\equiv(Yw)_{k}=0,\qquad\forall\;k,$
(4)

where $w_{i}$ is an $n$-length vector. We denote this construction as "linear
law $\mathcal{F}$", which is represented by the $w_{i}$ vector. As mentioned
in the introduction above, the intuition behind this nomenclature originates
from physics: $\mathcal{F}$ can be considered a "law" on the set $Y$ because
it represents a relation that is true for all $k$, i.e., for all elements of
$Y$.

###  3.2 Determine the linear law from the data

To determine the coefficients of linear law $w_{i}$, recognize that the
definition in Eq. (4) can be written as $\|Yw\|=0$. In the usual quadratic
norm, this takes the following form:

$\|Yw\|^{2}=\frac{1}{K}\left(Yw\right)^{T}\left(Yw\right)=w^{T}Cw=0,$ (5)

where

$C=\frac{1}{K}Y^{T}Y,$ (6)

is the correlation matrix corresponding to the original dataset.

To avoid the trivial solution $w=0$ in Eq. (5), we further require that
$\|w\|=1$. To implement this new constraint, the problem can be treated as a
minimization task. By using the Lagrange multiplier method, we can write:

$\chi^{2}(\lambda)=w^{T}Cw-\lambda w^{T}w=\text{min.}$ (7)

The solution of Eq. (7) is the

$Cw^{(\lambda)}=\lambda w^{(\lambda)}$ (8)

eigenvalue equation. This yields a number of $n+1$-length eigenvectors, which
are all potential linear laws. We need an additional constraint to select the
eigenvector that best represents the data. An exact law would satisfy
$\|Yw\|=0$, which means that the relation in Eq. (4) is completely fulfilled.
Usually, this is not possible to satisfy in practice, and $\mathcal{F}$ maps
the elements of $\mathcal{Y}$ to small numbers around zero:

$\mathcal{F}(Y^{k})=\sum_{i=0}^{n}Y_{ki}w_{i}\equiv\xi_{k}.$ (9)

Substituting this back into Eq. (5) yields:

$\|Yw\|^{2}=\frac{1}{K}\sum_{k=0}^{K}\xi_{k}^{2}=\left\langle\xi^{2}\right\rangle.$
(10)

On the other hand, substituting the solutions of Eq. (8) into Eq. (5) yields

$\|Yw\|^{2}=\lambda w^{T}w=\lambda.$ (11)

By comparing Eqs. (10) and (11), one can immediately see that the expectation
value of $\xi^{2}$, which is the variance of the value of $(Yw)_{k}$ on the
whole sample set, is simply $\lambda$. The linear law that performs the best
is the one corresponding to the smallest variance because it is the closest to
the ideal zero defined in Eq. (4). This linear law can now be easily selected
from the eigensystem defined by Eq. (8). The linear law that describes the
dataset with the smallest average error is the eigenvector in Eq. (8)
corresponding to the smallest eigenvalue. This always exists because $C$ is
symmetric and positive definite; hence, all eigenvalues are real and positive.

Notably, the linear law has an intuitive meaning. The process described above
has a formal similarity to the principal component analysis (PCA) method. A
large difference, however, is that in PCA, we are interested in the
eigenvector corresponding to the largest eigenvalue; here, we are searching
for the smallest one. This comparison helps give intuitive meaning to the
$w_{i}$ linear law. It is a vector in the embedding space that is orthogonal
to the dataset. This is the direction in which the time-embedded samples
change the least or in this direction, they remain almost constant for the
whole dataset. This is a "common property" that is found by linear laws, and
it can be imagined as finding the normal of a hyperplane that contains the
data. In practice, this plane has a thickness corresponding to small
variations in data, but the thinner it is, the better the linear law.

Thus far, our formulation is based upon the idea of having a very long time
series sample, which is then time embedded into the $Y_{ki}$ matrix. In some
tasks, this might be the case, but in many problems, the learning set is given
as a labeled set of time series samples $y_{m}(t)$, where $m\in\mathbb{N}$.
This situation can be reduced to the case study above. The process of
generating $Y_{ki}$ can be applied to individual samples, which results in a
set of matrices $Y_{k^{\prime}i^{\prime}}^{(m)}$. These matrices can be
concatenated along their first (row, $k^{\prime}$) axis to form a compound
$Y_{ki}$. This can be accomplished because the $k^{\prime}$ indexed rows of
$Y$ contain time-embedded samples, and their order does not matter for the
process of calculating the linear law. The rows can be thought of as the new
learning samples for the linear law. Adding new rows to $Y_{ki}$ simply means
increasing the learning set. In standard notation, this can be described as
augmenting the first sample matrix with the others to form a new larger block
matrix with much longer columns. If all the samples have a uniform $L$-length
and the linear law is $I$ long (the same length as the embedding depth), then
$Y_{k^{\prime}i^{\prime}}^{(m)}$ is an $(L-I+1)\times I$ dimension matrix. If
we have $M$ samples, after concatenating the matrices corresponding to the
samples, the resulting $Y_{ki}$ has $((L-I+1)\cdot M)\times I$ dimensions:

$Y_{ki}=\begin{bmatrix}Y_{k^{\prime}i^{\prime}}^{(1)}\\\
Y_{k^{\prime}i^{\prime}}^{(2)}\\\ \vdots\\\
Y_{k^{\prime}i^{\prime}}^{(m)}\end{bmatrix}.$ (12)

This larger $Y$ matrix can be treated the same as the $Y_{ki}$ described
above. In this way, the linear law determination process is independent of the
form of the given dataset. Everything can be reduced to collecting time-
embedded samples into a large $Y_{ki}$ matrix, which can be treated in a
standard way.

###  3.3 Generating features

In the previous sections, it was discussed how to determine the linear laws if
a set of samples were given. This section demonstrates how to use linear laws
to transform datasets and generate features. Since linear laws represent
properties that are common in the elements of a defining set, in a
classification task, we need to determine a linear law for every class. This
defines a mapping from the classes to linear laws:

$\mathcal{H}:C_{j}\quad\rightarrow\quad w_{i}^{(j)},$ (13)

where $C_{j}$ are the sets corresponding to the classes in the dataset
($j\in\mathbb{N}$). The elements of every class can be transformed by linear
laws in the following way. Let us denote one sample from a given class by
$y_{m}(t)$, which is a time series. First, this time is embedded in a standard
way, as described in Eqs. (1) and (3). This can be thought of as mapping the
$L$-length time series sample into an $L-n+1\times n$ dimensional matrix
$Y_{ki}^{(m)}$. Then, the $w_{i}^{(j)}$ linear law can be applied to the
sample, similar to that in Eq. (9):

$\sum_{i=0}^{n}Y_{ki}^{(m)}w_{i}^{(j)}=\xi_{k}^{(m,j)},$ (14)

where the $\xi_{k}^{(m,j)}$ vector contains the transformed features of sample
$m$ according to linear law $w_{i}^{j}$, which corresponds to class $C_{j}$.
The meaning of these features can be understood by looking at Eq. (9). They
measure how effectively a linear law can transform the subsamples
corresponding to the given sample into zero. The closer to zero the subsamples
are, the better the linear law describes the sample. The intuition behind the
features is that the linear law $w_{i}^{(j)}$ transforms elements of class
$C_{j}$ closer to zero than samples from other classes. In this way, the
features resulting from the transformation with linear law $w_{i}^{(j)}$
behave like similarity detectors for elements of class $C_{j}$. Of course, in
real applications, the situation can be more complicated, and different
elements of a sample are mapped to zero to different degrees, which is why it
is necessary to retain all the features.

These features can be used for classification in the following way. We need to
know how a given sample was transformed by different linear laws to detect how
similar the sample is to a given class. Because of this, every sample must be
transformed by the linear laws of all other classes. This can be intuitively
considered if one thinks about how to transform an unknown sample. In this
situation, we need to transform a sample with all of the linear laws
corresponding to all possible classes to create a comparison. Based on this
information, a classifier can be trained that learns what the elements of each
class look like after they are transformed by the linear laws corresponding to
other classes. If the classes transform very differently from each other, the
resulting vectors will differ greatly from one another, provided that we
applied the transformation of the correct class’s linear law. This greatly
aids any classifier algorithm because samples from different classes move
further from each other in the abstract feature space. If the possible classes
(and their respective linear laws according to Eq. (13)) are indexed with $j$,
then the transformed features for a sample $y_{m}(t)$ can be collected in a
vector in the following way:

$\bm{\xi}^{m}=\left[\xi_{k}^{(m,1)},\xi_{k}^{(m,2)},\dots,\xi_{k}^{(m,J)}\right].$
(15)

This is a collection of feature vectors, each corresponding to a given class.
This can be treated in different ways according to the given application. One
way is to simply flatten $\bm{\xi}^{m}$ and concatenate the different
$\xi_{k}^{(m,1)}$ after each other. In general, this process generates an
$(L-n+1)\cdot J$-length feature vector for each sample, where $J$ is the
number of classes and $n$ is the length of the linear law. In applications,
this feature vector can be downsampled if a less detailed representation is
sufficient for classification.

If there are only two classes ($J=2$), the feature vector $\bm{\xi}$ can be
greatly simplified in certain cases. It is sufficient to use the linear law
corresponding to one of the classes:

$\bm{\xi}^{m}=\xi_{k}^{(m,1)}.$ (16)

This is especially useful in cases such as anomaly detection, where a well-
defined reference class is given and the task is to separate a sample from
other samples that might not even belong to the same class. This approach
works because when there are only two possible classes, it is sufficient for
the classifier to detect whether a given sample is similar to the reference
class. This method can also be thought of as outlier detection in a sense
because we do not need the linear law of the outliers, and it might not even
exist. However, some outlier samples are needed to train the classifier. In
the task of classifying the ECG signals between normal and ectopic types, this
is the situation. There are many different ways an ECG signal can be ectopic,
but we are not interested in separately classifying these types of signals. We
only want to know whether a healthy ECG signal was obtained. Normal heartbeats
are selected as the reference class, and ectopic signals are defined as "not
normal". Every sample is transformed by the linear law derived from normal
heartbeats, and the resulting features measure how similar a sample is to
samples from normal ECG signals.

In summary, the features described above have many advantageous properties
from a representation learning point of view [1].

They offer multiple interpretable explanatory factors. The elements of the
feature vector describe how similar a given interval of a signal is to the
that in the reference set.

They also show properties of semisupervised learning. When generating features
according to Eq. (16), only the reference class is used to determine linear
laws for both classes.

In the transformed feature space, given samples naturally cluster by class.
This is the reason why a simple classifier works so well, as will be shown
below.

The transformed features form manifolds that reduce the dimensionality
requirements to represent the data. This is supported by the fact that simple
classifiers such as random forests and support vector machines work very well
with these new features. It is sufficient to find manifold boundaries in the
feature space that can be represented with less data.

This representation is also sparse. The feature transformation basically
behaves like a similarity detector and signals the presence of a given class
similarly to one-hot encoding. For example, the components of the large
feature vector given in Eq. (15) will be close to zero in the segment that
corresponds to a given class, and they will be larger in other segments,
signaling the presence of another class.

The structure of the feature vector is determined by a relatively simple,
linear, and interpretable mathematical object, a linear law, as defined in Eq.
(4). This vector, which usually has a length of 10-20 elements, is able to
represent the relations and connections between the elements of a given class,
which makes them similar. It compresses this information into a few real
numbers, and with this, it characterizes thousands of samples. In addition,
this information can be easily extracted. The feature generation according to
Eq. (14) is a linear process and can also be easily interpreted.

##  4 Dataset

For training and testing purposes, we used a database of QRS complexes from
[24]. This is a balanced subset of the MIT-BIH database [38] that includes
healthy and ectopic beats only. The training–testing split follows the
protocol defined by de Chazal et al. [27]; thus, it is guaranteed that samples
from the same patients are not mixed between the train and testing sets. In
this way, it can be assured that the results presented here generalize well,
and similar performance can be expected for new samples. The training set
contains 8520 samples, while the test set contains 6440 signals. Some examples
from the dataset can be seen in Fig. 1. For the purposes of this work, this
database is divided into three parts in the following way: $40$ % of the
training set is used for the training, and the remainder is retained as a
validation set, which is mainly used to fix the hyperparameters of the various
classifiers used. The original test remained unchanged and was used only to
determine the classification accuracy.

This division of the training and testing sets is partly chosen to demonstrate
the data efficiency of this modified LLT method. Placing more elements in the
train set does not significantly increase the accuracy. The explanation behind
this behavior is that the requirement for a successful transformation is to
have a sufficient number of samples to obtain an accurate linear law according
to Eqs. (9) to (11). Since the point of a linear law is to represent a common
property of a learning set in a compact form, adding more samples of the same
type does not influence the result once good statistics are obtained. In this
case, a linear law is determined from samples that originate from a given pool
of patients. Adding signals from the same patients would not influence the law
significantly, but including more patients probably will, as ECG signals show
variations from person to person. If the train set contains samples from a
sufficient number of different patients who represent a faithful sampling of
the general population, then the derived linear law will no longer change
significantly by adding new patient data.

The samples in the dataset are processed in a standard way [39, 26, 40].
First, a low-pass filter with a $20$ Hz cutoff frequency and a high-pass
filter with a $0.5$ Hz cutoff frequency are used to remove the noise and
baseline shift from the samples. Then, the signals are standardized so they
have a zero mean, and they are normalized with their maximum value. The QRS
peaks are identified in these samples and cut off so that at an end, there are
30 datapoint-long samples that are centered on the QRS complex peak. This
means that when determining the dimensions of $Y_{ki}$ in Eq. (12), $L=30$
This process can always create a standard input from any signal and makes the
algorithm less sensitive to the format in which the samples are given.

(a) Healthy QRS complexes

(b) Ectopic QRS complexes

Figure 1: Examples from the learning set

##  5 Classification algorithm for ECG signals

The classification task is realized as a two-step process. First, the LLT is
applied to the sample that generates features from the given signal, as
described in Eq. (14). Then, a classifier trained on these features processes
the sample and output the final result. A zeroth step, which is, strictly
speaking, not part of the classification, is also taken to standardize the
input signals, as described in Section 4. In this step, the input passes
through a noise filter, and then it is searched for peaks that are cut out
with a window. Note that since the existence of one QRS peak per sample cannot
be guaranteed for general ectopic signals, these cases must be handled by the
algorithm. In this study, the logic is adopted that if a peak search fails to
return a proper peak or finds more than one peak per labeled sample, then this
signal is automatically classified as an ectopic signal. The reason behind
this is that a peak search always finds a peak in normal heartbeat samples;
hence, if there is any problem with the search, the signal must be an ectopic
signal. These artifacts are present in $5\%$ of the samples in the train and
validation sets and in $1\%$ of the test set.

###  5.1 Training the classifier

Similar to classification, training is also a two-step process. The first step
is to find the linear laws corresponding to the classes in the learning set
according to Eq. (8). Then, the linear law of the normal beats is used to
perform an LLT for the whole learning set according to Eqs. (14) and (16).
Now, the whole learning set, including both the normal and ectopic beats, is
transformed into the new representation. The hyperparameters of LLT must be
determined at this step. In this case, there is only one hyperparameter, which
is the length of the linear law, which is denoted by $n$ in Eq. (4).

Determining the value of $n$ is a multifaceted problem, and the correct value
often depends on the application and the dataset. However, there are multiple
considerations that, when taken into account, can significantly reduce the
possible values of $n$.

First, these parameters must be sufficiently large so that the linear law has
a sufficient number of free variables to accurately represent the data with
minimal error. This can be checked by looking at the value of the smallest
eigenvalue in the solution of Eq. (8), i.e., the eigenvalue equation.
According to Eq. (11), this is the variance of the transformed values. Smaller
values of these parameters show that the linear law is better at mapping the
data to ideally zero. Increasing $n$ generally decreases the error of the fit
as it has more parameters, but the noise and statistics place an upper limit
on decreasing the error in this way. The error most of the time arises in the
form of complex eigenvalues in Eq. (8), which appear after increasing $n$ and
attempting to transform the data with a linear law.

Second, $n$ determines the degrees of freedom of the fit, and it also plays a
crucial role in generating features. As shown by Eq. (13), the number of
features generated per sample is $L-n+1$, where $L$ is the length of the
sample. This means that the larger $n$ is, the smaller the number of features
generated for classification, which can decrease the accuracy. $n$ must be
sufficiently large to properly represent the signal through linear laws, but
it cannot increase arbitrarily because it limits the number of features that
are generated.

Another aspect to consider regarding the parameter $n$ is that we want to keep
it as low as possible to avoid overfitting. This can be checked by looking at
how well it performs with new data. One possible method is given as follows.
First, the linear law is determined with the train set. Then, it is tested.
Finally, it is evaluated with the validation set. This means calculating
$\xi_{k}$ in a way that in Eq. (9) $Y_{ki}$ originates from the test set and
$w_{i}$ from the training set. This method checks how good linear law $w_{1}$
is for the validation set. In this way, we have two $\xi_{k}$ vectors, one
corresponding to the train set ($\xi_{k}$) and the other ($\xi^{\prime}_{k}$)
corresponding to the validation set. By comparing the variances corresponding
to both vectors, how well the linear law fits both datasets is revealed. The
value of $n$ that makes the most sense is the one where the variances of
$\xi^{\prime}_{k}$) and $\xi_{k}$ are close to each other because this means
that the linear law generalizes well to the new data. These observations
define an interval for the possible values of $n$. The best value from this
interval can be chosen by hyperparameter optimization considering the whole
process. This basically means that $n$ can be optimized together with the
parameters of different classifiers. However, it must be remembered that $n$
is not part of the classifier; rather, it is a part of data representation and
feature generation. It determines the number and quality of the features the
classifiers use and influences performance in this way.

Following the previously mentioned observations, it was found that $n=11$
provides a good balance. It leads to a small variance for both the testing and
training sets and the values are close to each other. Eq. (8), i.e., the
eigenvalue equation, is numerically stable with different datasets, and all of
the studied classifiers obtain good performance with this setting.

The second step of the LLT-based classification is to train a classifier with
the features generated by the transformation [16, 17]. In this way, the
classifier operates with the transformed samples only without using the
original data points themselves. Since these two steps are independent of each
other, the linear law does not constrain the type of classifier. To study the
effectiveness of the LLT, four different classifiers were trained with the
same transformed learning set: random forest (RF) [41], k-nearest neighbors
(KNN) [42], support vector machine (SVM) [43], and a simple neural network
(NN) [44, 45, 46].

The hyperparameters of the abovementioned classifiers (depth of decision
trees, k-parameters, etc.) are fixed by maximizing the performance for the
validation set. The details corresponding to the different classification
methods can be found below along with the results.

##  6 Results

The results of LLT-based classification of ECG signals are summarized in Table
1. Common performance metrics were used to evaluate the different classifiers.
From these metrics, the total accuracy (ACC) is defined as:

$\textbf{ACC}=\frac{\text{TP}+\text{TN}}{\text{TP}+\text{FN}+\text{TN}+\text{FP}}$
(17)

where TP, TN, FP, and FN are the true positive, true negative, false-positive,
and false-negative matches, respectively. The sensitivity/recall (Se) can be
defined as:

$\textbf{Se}=\frac{\text{TP}}{\text{TP}+\text{FN}}.$ (18)

The positive predictability/precision (+P) is defined in the following way:

$\textbf{+P}=\frac{\text{TP}}{\text{TP}+\text{FP}}.$ (19)

These performance metrics are determined for both the testing and validation
sets. The reason for this is to examine how well the LLT-generated features
generalize to a new group of patients. The validation set contains ECG signals
from the same patients as the train set, while the test set contains signals
from different patients than those in the other two datasets. These results
characterize the real-world performance of the proposed method with new,
previously unseen data. As can be observed in Table 1, the metrics are close
to each other for both sets, which means that the method generalizes well to
new patient data. This supports the conclusion that the LLT method is able to
grasp the general common properties of healthy QRS complexes. The highest
accuracy for the test set, $94.3\%$, is reached by the SVM. It is also worth
noting that a simple linear SVM is sufficient to reach $~{}90\%$ accuracy for
both the testing and validation sets. This means that the LLT method with the
new feature generation procedure, described in Eq. (16), successfully
generates features that make the classes almost linearly separable in the
transformed feature space. This is the reason why simple classifiers achieve
high performance, falling within the range of current state-of-the-art methods
[21]. An even more precise comparison can be made using the results from [24],
where variable projection networks (VPNets) obtain the best results. This
neural network was trained with the same database, which makes the comparison
more realistic. The SVM total accuracy is only $2.4\%$ lower than that of the
aforementioned VPNet, although the discrepancy is somewhat higher in terms of
the other metrics.

The efficiency of the linear law transformed feature space is demonstrated by
two factors. The testing and validation sets are considerably larger than the
train set, which shows that the method can successfully grasp the multitude of
underlying factors present within the data.

Another result shows that the method effectively finds the factors that
differentiate the healthy and ectopic QRS complexes, and it is related to the
number of parameters in the classifiers. The RF and NN classifiers require a
small number of parameters to fit the data, i.e., 10 estimators with 6 depth
trees in the case of RF and one layer with 8 neurons for the NN. The fit of
each simple classifier is detailed below.

Table 1: Performance of different simple classifiers with different datasets
transformed by LLT. For a close comparison, we list the results of the VPNet
method, which uses the same dataset as that of the LLT-based classifiers [24].
The general performance ranges of state-of-the-art methods are also shown
[21]. The highest value in each column is highlighted.

Method | Validation | Test
---|---|---
Total Accuracy | Normal | Ectopic |  Total Accuracy | Normal | Ectopic
Se | +P | Se | +P | Se | +P | Se | +P
RF | 93.6% | 94.3% | 93.1% | 93.0% | 94.2% | 92.1% | 92.9% | 91.4% | 91.2% | 92.8%
SVM | 95.0% | 96.3% | 93.8% | 93.6% | 96.2% | 94.3% | 94.4% | 94.2% | 94.2% | 94.4%
SVM (linear) | 89.4% | 89.9% | 89.0% | 88.9% | 89.8% | 91.8% | 93.2% | 90.6% | 90.4% | 93.0%
NN | 95.2% | 95.7% | 94.7% | 94.7% | 95.6% | 93.1% | 94.0% | 92.3% | 92.2% | 93.9%
KNN (k=4) | 96.4% | 97.4% | 95.5% | 95.4% | 97.4% | 91.5% | 95.0% | 88.8% | 88.0% | 94.6%
KNN (k=57) | 92.7% | 90.7% | 94.5% | 94.7% | 91.1% | 90.9% | 88.1% | 93.3% | 93.7% | 88.7%
VPNet | N/A | N/A | N/A | N/A | N/A | 96.7% | 99.4% | 94.2% | 93.9% | 99.3%
State-of-the-art | N/A | N/A | N/A | N/A | N/A | N/A | 80-99% | 85-99% | 77-96% | 63-99%

###  6.1 Random forest

The main two parameters of the random forest classifier are the number of
estimators and tree depth. Increasing these parameters leads to a better fit
for the train set; however, the accuracy for the testing set will inevitably
be worse because the classifier overfits the signals of patients who are in
the validation and train sets. To avoid this, the parameters are optimized in
the following way: the accuracy of the classification is measured with both
the training and testing sets for different combinations of parameter values.
These values are considered better when the accuracies for the two sets of
data are closer to each other while still maintaining good performance. This
method prevents overfitting by not only rewarding high accuracy for the train
set but also expecting similar performance for the test set. Note that the
testing set is not used in any manner to calculate the parameter values. This
procedure leads to a random forest of only 10 estimators and 6-level deep
trees. It can also be seen in Table 1 that the performance for the test set
and validation set is similar, which shows that the method successfully
generalized to new patient data.

###  6.2 k-nearest neighbors

The parameters of the classifier are optimized with the validation set. This
results in $k=4$ and the Chebyshev-metric-based distance. The performance for
the test and validation is shown in Table 1 under the KNN ($k=4$). It is
known, however, that larger $k$ values can offer more stability simply because
more points are considered while determining the class of a new point. A way
to address this problem is to use the known heuristic thumb rule for the
determination of $k$:

$k=\sqrt{N},$ (20)

where N is the number of data points. This results in $k=57$. The performance
of the model parametrized this way can also be found in Table 1 under KNN
($k=57$). These results exhibit a comparatively lower total accuracy when
compared to the results pertaining to the $k=4$ value. Nonetheless, the
observed variances between the two are comparatively small. Additionally, this
approach for determining the optimal $k$ value holds the advantage of
dispensing the need for a validation set and can prove beneficial in scenarios
characterized by limited data availability.

The $k=4$ KNN model has the highest overall accuracy metrics for the
validation set, although the numbers are close to those of the NN and SVM
results. However, the NN and SVM models are able to transfer more of this
accuracy to the test set than the KNN model. This behavior can be intuitively
understood.

The low $k$ determined from the test set means that transformed points in the
validation set are close to points in the training set, and KNN requires very
few neighbors to obtain a correct result, as there are fewer ambiguous points.
This outcome is the manifestation of the LLT, which is designed to transform
similar signals in close proximity to each other in the feature space. The
train and validation sets contain samples from the same pool of patients;
hence, the transformed samples are close to each other. However, the test set
contains completely new samples, and some of them may be further away from the
points of the train set in the feature space. The KNN method is limited in its
capacity to accurately generalize because it lacks the requisite number of
internal parameters, unlike the NN and SVM methods. Hence, the predictive
accuracy of KNN for the test set is relatively lower than that of NN and SVM
because of the new type of signals present in the test set.

###  6.3 Support vector machine

This classifier with a nonlinear kernel is the most natural choice for the LLT
method. Since the feature space transformation attempts to map similar samples
to close points in the feature space, it creates clusters corresponding to
classes. The SVM method finds hypersurfaces that separate these clusters.
Thus, the two methods strengthen each other, and SVM provides a meaningful
generalization for the feature transformation: it finds classification borders
in the feature space that are suggested by the transformed samples. This
method also does not require the optimization of any meta parameters (such as
the tree depth), which makes its application much more straightforward. It can
be seen in Table 1 that the SVM provides similarly good performance on both
the test and validation sets, suggesting that LLT successfully obtains
meaningful features for the separation of healthy and ectopic signals, and the
results generalize to new data (and patients) well.

In addition to the more general nonlinear SVM method, a simpler model with a
linear kernel was also fitted in the feature space. The linear model performs
surprisingly well despite its limited capacity to generalize and reaches
approximately $90\%$ accuracy for both the test and validation data. The fact
that a linear model manages to reach this accuracy offers some insight into
the structure of the feature space. The samples are consistently mapped to
distinct locations based on their respective classes to such an extent that a
linear SVM can find a hyperplane in the feature space that effectively
separates up to $90\%$ of the samples.

###  6.4 Neural network

Neural networks are the most widely used and versatile machine learning
systems. While the classification task on the LLT feature space does not
demand the intricacy of a neural network, analyzing the problem through a
neural network perspective can provide an alternative viewpoint on the
characteristics of feature generation based on the LLT.

The exact form of the NN is a meta-parameter similar to the number of decision
trees and tree depth in the RF method. Similarly, the validation set is used
to determine the value of these parameters to prevent overfitting of the train
set. The following neural network structure is found to be optimal: a fully
connected simple neural network with 3 layers (one hidden layer). The input
layer has 24 neurons, the hidden layer has 8 neurons, and the output layer
contains two nodes corresponding to the two classes.

As shown in Table 1, the classification performance is similar to that of
other methods, and the results generalize well from the test set to the
validation set. The simplicity of the neural network can be explained by the
fact that other simpler methods already work well for classification.
Increasing the network will lead to higher accuracy on the train set, but it
will generalize poorly to the test set. This points to the conclusion that the
LLT method extracts the factors needed for the classification and further
manipulation of the features (with a larger neural network) does not provide
additional benefits.

##  7 Conclusions

In this paper, we presented a new technique to generate features from time
series-type data and successfully applied it to the task of binary ECG signal
classification. The new method extracts the features in a data-driven forward
manner, which results in a classifier-agnostic feature space. These properties
are achieved by using the principle of linear laws and the LLT method [16,
17]. Here, linear laws are identified as common linear relationships between
points in samples that belong to the same class. In this way, linear laws are
able to represent classes in a concise and effective manner.

The features generated by the linear laws provide many advantages for
classification, which was demonstrated by the fact that even linear
classifiers reached very high total accuracy. Several different classifiers
were trained with the LLT features extracted from a balanced dataset. RF-,
SVM-, KNN- and NN-based classifiers reached above $90\%$ total accuracy for
the test set. The SVM method performed the best, achieving $94.3\%$ total
accuracy and thus placing it into the upper echelon of currently used methods.
In the specialized task of classifying ECG signals corresponding to the same
pool of patients as that in the training set, the KNN method reached the
highest accuracy of $96,4\%$.

This new method generates high-quality representations with easily and
intuitively interpretable features while ensuring that the whole process is
verifiable, which can be important for certain applications such as those in
health care. The LLT-based technique was also shown to be data-efficient by
comparing it to the state-of-the-art VPNet method [24]. The LLT-based method
is capable of achieving a similar level of performance for the test set, with
a difference of only $2.4\%$ while utilizing less than half of the training
samples from the same dataset.

## Data availability

All the raw data generated in this study are available from the corresponding
author upon reasonable request.

## Acknowledgments

The authors would like to thank András Telcs for his valuable comments and
suggestions. The research was supported by the Ministry of Innovation and
Technology NRDI Office within the framework of the MILAB Artificial
Intelligence National Laboratory Program. A.J. received support from the
Hungarian Scientific Research Fund (OTKA/NRDI Office) under contract number
K123815. P.K. was supported by the ÚNKP-22-5 New National Excellence Program
of the Ministry for Culture and Innovation from the source of the National
Research, Development and Innovation Fund. Project no. PD 142593 was
implemented with the support provided by the Ministry of Culture and
Innovation of Hungary from the National Research, Development, and Innovation
Fund, financed under the PD_22 “OTKA” funding scheme.

## Author contributions statement

A. J., P.K., M.T.K., and P.P. conceptualized the work and contributed to the
writing and editing of the manuscript. P.K. and P.P. acquired the data, and
P.P. conducted the analysis. A.J. supervised the research.

## Competing interests

The authors declare no competing interests.

## References

  * [1] Y. Bengio, A. Courville, P. Vincent, Representation learning: A review and new perspectives, IEEE Transactions on Pattern Analysis and Machine Intelligence 35 (8) (2013) 1798–1828, representation learning rewiev.  doi:10.1109/TPAMI.2013.50.
  * [2] A. Adadi, A survey on data-efficient algorithms in big data era, Journal of Big Data 8 (1) (2021) 24, reference for data efficiency in machine learning.  doi:10.1186/s40537-021-00419-9.
URL https://doi.org/10.1186/s40537-021-00419-9

  * [3] G. E. Dahl, M. Ranzato, A.-r. Mohamed, G. Hinton, Phone recognition with the mean-covariance restricted boltzmann machine, in: Proceedings of the 23rd International Conference on Neural Information Processing Systems - Volume 1, NIPS’10, Curran Associates Inc., Red Hook, NY, USA, 2010, p. 469–477, representation learning speech recognition success1.
  * [4] G. E. Dahl, D. Yu, L. Deng, A. Acero, Context-dependent pre-trained deep neural networks for large-vocabulary speech recognition, IEEE Transactions on Audio, Speech, and Language Processing 20 (1) (2012) 30–42, representation learning speech recognition success2.  doi:10.1109/TASL.2011.2134090.
  * [5] L. Deng, M. Seltzer, D. Yu, A. Acero, A.-r. Mohamed, G. Hinton, Binary coding of speech spectrograms using a deep auto-encoder, in: Interspeech 2010, interspeech 2010 Edition, International Speech Communication Association, 2010, representation learning speech recognition success3.
URL https://www.microsoft.com/en-us/research/publication/binary-coding-of-
speech-spectrograms-using-a-deep-auto-encoder/

  * [6] G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. N. Sainath, B. Kingsbury, Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups, IEEE Signal Processing Magazine 29 (6) (2012) 82–97, representation learning speech recognition success4.  doi:10.1109/MSP.2012.2205597.
  * [7] A. Krizhevsky, I. Sutskever, G. E. Hinton, ImageNet classification with deep convolutional neural networks, in: F. Pereira, C. Burges, L. Bottou, K. Weinberger (Eds.), Advances in Neural Information Processing Systems, Vol. 25, Curran Associates, Inc., 2012, representation learning object detection success.
URL
https://proceedings.neurips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf

  * [8] Y. Bengio, R. Ducharme, P. Vincent, C. Janvin, A neural probabilistic language model, J. Mach. Learn. Res. 3 (null) (2003) 1137–1155, representation learning statistical language modeling success.
  * [9] R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, P. Kuksa, Natural language processing (almost) from scratch, J. Mach. Learn. Res. 12 (null) (2011) 2493–2537, representation learning statistical language + convolution SENNA success.
  * [10] P. Mehta, D. J. Schwab, An exact mapping between the variational renormalization group and deep learning, arXiv preprint arXiv:1410.3831Renorm gorup in macine learning (2014).
  * [11] C. Bény, Deep learning and the renormalization group, arXiv preprint arXiv:1301.3124Renormalization in machine learning (2013).
  * [12] H.-Y. Hu, D. Wu, Y.-Z. You, B. Olshausen, Y. Chen, RG-Flow: A hierarchical and explainable flow model based on renormalization group and sparse prior, Machine Learning: Science and Technology 3 (3) (2022) 035009, renormalizaiton flow based genrative model.
  * [13] I. Higgins, N. Sonnerat, L. Matthey, A. Pal, C. P. Burgess, M. Bošnjak, M. Shanahan, M. Botvinick, D. Hassabis, A. Lerchner, SCAN: Learning hierarchical compositional visual concepts, in: International Conference on Learning Representations, 2018, learning concepts and combine them to new categories.
URL https://openreview.net/forum?id=rkN2Il-RZ

  * [14] I. Higgins, D. Amos, D. Pfau, S. Racanière, L. Matthey, D. J. Rezende, A. Lerchner, Towards a definition of disentangled representations, CoRR abs/1812.02230, using symmetry groups to disentangling representations (2018).
URL http://arxiv.org/abs/1812.02230

  * [15] A. Jakovac, D. Berenyi, P. Posfay, Understanding understanding: a renormalization group inspired model of (artificial) intelligence (2020).  doi:10.48550/ARXIV.2010.13482.
URL https://arxiv.org/abs/2010.13482

  * [16] M. T. Kurbucz, P. Pósfay, A. Jakovác, Facilitating time series classification by linear law-based feature space transformation, Sci Rep 12 (1) (2022) 18026, reference for LLT.
  * [17] A. Jakovác, M. T. Kurbucz, P. Pósfay, Reconstruction of observed mechanical motions with artificial intelligence tools, New Journal of Physics 24 (7) (2022) 073021, reference for LLT, mechanical motion.  doi:10.1088/1367-2630/ac7c2d.
URL https://dx.doi.org/10.1088/1367-2630/ac7c2d

  * [18] M. T. Kurbucz, P. Pósfay, A. Jakovác, Predicting the price movement of cryptocurrencies using linear law-based transformation, arXiv preprint arXiv:2305.04884 (2023).
  * [19] M. T. Kurbucz, P. Pósfay, A. Jakovác, LLT: An R package for linear law-based feature space transformation, arXiv preprint arXiv:2304.14211 (2023).
  * [20] A. Lyon, A. Mincholé, J. P. Martínez, P. Laguna, B. Rodriguez, Computational techniques for ECG analysis and interpretation in light of their contribution to medical advances, Journal of The Royal Society Interface 15 (138) (2018) 20170821.  doi:10.1098/rsif.2017.0821.
URL https://doi.org/10.1098/rsif.2017.0821

  * [21] E. J. da S. Luz, W. R. Schwartz, G. Cámara-Chávez, D. Menotti, ECG-based heartbeat classification for arrhythmia detection: A survey, Computer Methods and Programs in Biomedicine 127 (2016) 144–164, for comparison with other methods.  doi:https://doi.org/10.1016/j.cmpb.2015.12.008.
URL https://www.sciencedirect.com/science/article/pii/S0169260715003314

  * [22] M. A. Serhani, H. T. El Kassabi, H. Ismail, A. Nujum Navaz, ECG monitoring systems: Review, architecture, processes, and key challenges, Sensors 20 (6) (2020).  doi:10.3390/s20061796.
URL https://www.mdpi.com/1424-8220/20/6/1796

  * [23] S. Kiranyaz, T. Ince, M. Gabbouj, Real-time patient-specific ECG classification by 1-d convolutional neural networks, IEEE Transactions on Biomedical Engineering 63 (3) (2016) 664–675.  doi:10.1109/TBME.2015.2468589.
  * [24] P. Kovács, G. Bognár, C. Huber, M. Huemer, VPNET: Variable projection networks, International Journal of Neural Systems 32 (01) (2022) 2150054, pMID: 34651549.  arXiv:https://doi.org/10.1142/S0129065721500544, doi:10.1142/S0129065721500544.
URL https://doi.org/10.1142/S0129065721500544

  * [25] T. Mar, S. Zaunseder, J. P. Martínez, M. Llamedo, R. Poll, Optimization of ecg classification by means of feature selection, IEEE Transactions on Biomedical Engineering 58 (8) (2011) 2168–2177.  doi:10.1109/TBME.2011.2113395.
  * [26] G. D. Clifford, F. Azuaje, P. McSharry, Advanced Methods And Tools for ECG Data Analysis, Artech House, Inc., USA, 2006.
  * [27] P. de Chazal, M. O’Dwyer, R. Reilly, Automatic classification of heartbeats using ecg morphology and heartbeat interval features, IEEE Transactions on Biomedical Engineering 51 (7) (2004) 1196–1206.  doi:10.1109/TBME.2004.827359.
  * [28] I. Jekova, G. Bortolan, I. Christov, Assessment and comparison of different methods for heartbeat classification, Medical Engineering & Physics 30 (2) (2008) 248–257.  doi:https://doi.org/10.1016/j.medengphy.2007.02.003.
URL https://www.sciencedirect.com/science/article/pii/S1350453307000355

  * [29] F. Cakrak, P. J. Loughlin, Multiwindow time-varying spectrum with instantaneous bandwidth and frequency constraints, IEEE Transactions on Signal Processing 49 (8) (2001) 1656–1666.  doi:10.1109/78.934135.
  * [30] P. S. Addison, Wavelet transforms and the ecg: a review, Physiological measurement 26 (5) (2005) 155–199.  doi:10.1088/0967-3334/26/5/R01.
  * [31] P. Kovács, S. Fridli, F. Schipp, Generalized rational variable projection with application in ECG compression, IEEE Transactions on Signal Processing 68 (2020) 478–492.  doi:10.1109/TSP.2019.2961234.
  * [32] G. Bognár, S. Fridli, ECG heartbeat classification by means of variable rational projection, Biomedical Signal Processing and Control 61 (2020) 102034.  doi:https://doi.org/10.1016/j.bspc.2020.102034.
URL https://www.sciencedirect.com/science/article/pii/S1746809420301907

  * [33] F. Castells, P. Laguna, L. Sörnmo, A. Bollmann, J. M. Roig, Principal component analysis in ECG signal processing, EURASIP Journal on Advances in Signal Processing (074580) (2007) 1–21.  doi:10.1155/2007/74580.
URL https://doi.org/10.1155/2007/74580

  * [34] M. P. S. Chawla, A comparative analysis of principal component and independent component techniques for electrocardiograms, Neural Computing and Applications 18 (2009) 539–556.  doi:https://doi.org/10.1007/s00521-008-0195-1.
  * [35] A. Jakovac, Time series analysis with dynamic law exploration (2021).  doi:10.48550/ARXIV.2104.10970.
URL https://arxiv.org/abs/2104.10970

  * [36] F. Takens, Detecting strange attractors in turbulence, in: D. Rand, L.-S. Young (Eds.), Dynamical Systems and Turbulence, Warwick 1980, Springer Berlin Heidelberg, Berlin, Heidelberg, 1981, pp. 366–381, time delay embedding theorem: The dynamical state of the system can be reconstructed form the temporal context.
  * [37] N. H. Packard, J. P. Crutchfield, J. D. Farmer, R. S. Shaw, Geometry from a time series, Phys. Rev. Lett. 45 (1980) 712–716, the dynamical state of the system can be reconstructed from time series.  doi:10.1103/PhysRevLett.45.712.
URL https://link.aps.org/doi/10.1103/PhysRevLett.45.712

  * [38] G. Moody, R. Mark, The impact of the MIT-BIH arrhythmia database, IEEE Engineering in Medicine and Biology Magazine 20 (3) (2001) 45–50.  doi:10.1109/51.932724.
  * [39] M. Gospodinov, E. Gospodinova, G. Georgieva-Tsaneva, Mathematical methods of ECG data analysis, in: Healthcare Data Analytics and Management, Elsevier, 2019, pp. 177–209.  doi:10.1016/b978-0-12-815368-0.00007-5.
URL https://doi.org/10.1016/b978-0-12-815368-0.00007-5

  * [40] A. Velayudhan, S. Peter, Noise analysis and different denoising techniques of ecg signal - a survey, 2016.
  * [41] T. K. Ho, Random decision forests, in: Proceedings of 3rd international conference on document analysis and recognition, Vol. 1, IEEE, 1995, pp. 278–282, reference for random forest classifier.
  * [42] N. S. Altman, An introduction to kernel and nearest-neighbor nonparametric regression, The American Statistician 46 (3) (1992) 175–185, reference for KNN method.
  * [43] C. Cortes, V. Vapnik, Support-vector networks, Machine learning 20 (3) (1995) 273–297, reference for SVM.
  * [44] W. S. McCulloch, W. Pitts, A logical calculus of the ideas immanent in nervous activity, The bulletin of mathematical biophysics 5 (4) (1943) 115–133, reference for NN.
  * [45] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, X. Zheng, TensorFlow: Large-scale machine learning on heterogeneous systems, nN reference, Tensorflow (2015).
URL https://www.tensorflow.org/

  * [46] R. Lippmann, An introduction to computing with neural nets, IEEE ASSP Magazine 4 (1987) 4–22, reference for simple NN.