1. Introduction
Sudden cardiac death (SCD) is an unexpected death caused by cardiovascular problems [
1] with or without a history of heart disease [
2,
3]. In general, SCD occurs within an hour after the onset of symptoms, although the person has no history of a fatal heart condition [
4]. SCD accounts for more than 50% of all deaths from cardiovascular disease [
1], ranking second as the leading cause of death, after cancer [
5]. SCD is a vital challenge for clinicians, as it can be experienced in individuals with no history of heart diseases. Numerous heart diseases lead to SCD, such as ventricular tachyarrhythmias (VTA), ventricular tachycardia (VT), ventricular fibrillation (VF), bradyarrhythmia (BA), coronary artery diseases (CAD), valvular diseases (RV), myocardial infarction (MI) and genetic factors [
6]. However, deaths by SCD are related to ventricular tachyarrhythmias (including VF and VT) and BA [
7], making the heart unable to pump blood effectively. The VF is an underlying quality in most SCD episodes and is considered the leading cause and possible detonator [
8,
9,
10], representing about 20% of SCD episodes. The survival rate decreases approximately 10% per minute for patients after VF onset [
1]. Therefore, an early prediction of SCD in a person suffering a VF is of great value for timely intervention, increasing the survival rate.
Predicting an SCD is vital since several actions can be taken to counteract it. For example, the Public Access Defibrillation (PAD) procedure rescues patients from impending death after collapse. However, the success rate of cardiac function restoration primarily depends on when first aid is given to stimulate the heart [
11]. It would be preferable to prevent the onset of SCD by providing medical aid before the collapse occurred, which leads to the question of whether it would be possible to have warning systems capable of recognizing cardiac arrest half an hour before the crisis [
12]. Efforts have been made regarding this severe health problem, developing efficient ways of predicting the SCD through invasive and non-invasive techniques [
13,
14,
15]. The main goal is to predict the SCD before its onset using ECG signals [
13,
16], since ECG is one of the most important physiological signals to identify cardiac abnormality and electrical conductivity features. Recent works have experimented with features of ECG and heart rate variability (HRV), a signal extracted from ECG, to detect the subtle changes that occur within the signals before an SCD and to identify in advance a possible SCD risk. Also, additional features (time, frequency, time-frequency, and non-linear) and machine learning algorithms have been used to predict SCD from ECG and HRV signals. According to recent reports, an SCD could be predicted up to 25 min before its onset through intelligent signal processing methods [
17,
18]. Thus, tools such as diagnostic support systems based on computational analysis and signal processing techniques have been shown to help detect SCD in advance.
In [
19,
20], an automated prediction of SCD based on HRV signals was performed. Signals were analyzed through techniques that identify data repeatability or time-frequency features such as the Recurrence Quantification Analysis (RQA) and the Discrete Wavelet Transform (DWT); statistics features such as entropy also were used. One important issue in this works is that data analysis can generate a large set of features. Then, a feature reduction is required to consider only the more relevant features; for this purpose, some analysis such as Kolmogorov complexity or feature ranking, commonly based on the t-test, are used. To reduce the information that the classifier has to process is an advantage of these works. In both cases, a prediction up to 4 min before SCD was reached through k-Nearest Neighbor (kNN) and SVM (Support Vector Machine) classifiers having an accuracy of
and
, respectively. Prediction time was increased up to five minutes with an accuracy of
when the kNN classifier processed time-domain features extracted from HRV signals [
21]. One disadvantage of SCD detection based on HRV signals is that computational time increases [
17], which could be an issue to consider in an application where time is relevant. Therefore, SCD detection also has been studied by directly using ECG signals. In [
16], the authors used a simplified evaluation of ECG signals based on a proposed Sudden Cardiac Death Index (SCDI) for the prediction of SCD. The SCDI integrates a weighted combination of the main features identified in the ECG signal and provides a way to obtain a unique value, which is able to differentiate between normal and SCD classes. The classification with SCDI and SVM reached 98.68% accuracy up to four minutes before SCD. A different prediction approach was proposed in [
22], where the authors analyze how ECG signal features change in consecutive time intervals. With this analysis, the time resolution of the prediction process was increased, and, using a multi-layer perceptron (MLP) classifier, it was possible to predict SCD 12 min before onset. Recently, an approach to SCD prediction based on ECG signals was presented in [
18]. This approach employs the Wavelet Packet Transform (WPT), which considers high-frequency bands in the ECG decomposition, reaching an accuracy of 95.8% and a prediction 20 min before onset. However, the frequency bands are fixed and depend on the sampling frequency, inhibiting the analysis of frequencies defined by the user. An alternative was to use Empirical Mode Decomposition (EMD), a technique able to separate the ECG signal into a set of frequency bands based on its information. In this way, a prediction 25 min before SCD was possible, with 94% accuracy [
17].
However, these predictions were made by considering a binary classification in normal and SCD signals. The main drawback of this comparison scheme is that the ECG signal of a patient could contain features that differ from a normal ECG signal due to, for instance, previous heart disease, but not necessarily because of a future SCD episode. Therefore, this evaluation could not be accurate since there is a high probability of SCD misdetection.
This work addresses the feature change in the ECG signal that occurs as the SCD event becomes closer, since this could help in early identification. A methodology based on sparse representations allows distinctive features to be found in normal and previous SCD signals. If these ECG signals are analyzed at different intervals before SCD, and their features are learned, a likely SCD episode could be identified in advance. The learned dictionaries allow a dynamic feature representation of the signal to be obtained, providing a certain flexibility degree to recognize the intraclass variation and improve the description and identification of SCD signals. Moreover, this approach considers a novel multi-class scheme that makes it possible to distinguish a previous SCD signal from a normal signal and, additionally, to more accurately know if this related to a closer or further time interval from the SCD.
Following this,
Section 2 contains the proposed method. The experiments designed to evaluate the feasibility of the proposed method, and the results achieved, are described in
Section 3. Finally, conclusions and future work are indicated in
Section 4.
3. Results and Discussion
In ECG applications, it is expected that, by using as a feature vector, the sparse representation helps to distinguish between the different ECG signals (normal and SCD). Since the aim is the early detection of changes in an ECG signal, which could be associated with a possible SCD, two general steps were followed in this methodology: (i) dictionary learning, to identify the features of each signal class in C and (ii) signal classification, by measuring the similarity between the features of a new input signal and the learned features for each class.
To identify the features of the signals considered in
C, a trained dictionary is necessary for each class. Through the learning process with k-SVD, a dictionary identifies the common elemental signals of a particular class. As mentioned in
Section 2.2,
C considers the samples for normal ECG signals and six time intervals at 5 min, 10 min, 15 min, 20 min, 25 min, and 30 min previous SCD, i.e., seven classes in total. Therefore, seven trained dictionaries are required to perform ECG signal classification based on sparse representations. For dictionary learning, it is necessary to have a set of samples of the same type from which the common elemental signals can be identified through the k-SVD algorithm. For this purpose, the samples in each class of
C were randomly selected and divided into test and training subsets; the division of the training and test sets followed a 55–45% relationship, i.e., for the training and test sets, ten and eight recordings were taken from the MIT/BIH NSR database, and eleven and nine recordings from the MIT/BIH SCDH database. No recording from the training stage was used for the test stage. Thus, the k-SVD was performed, receiving an initial dictionary
filled with random values, the training set of samples of a particular class
, and
iterations as parameters. The maximum number of iterations was set to ensure the dictionary was completely trained; fewer iterations could reduce the performance during signal decomposition. As a result, the dictionary
, which was specifically adapted to recognize the elemental signals of class
c, is obtained. This process is repeated for all the classes of interest; in this case, for all the classes in
C. Therefore, a set of trained dictionaries
,
are used to obtain the most accurate decomposition of their respective signals, which can be used for signal classification.
The class of a new input signal
x must be identified based on the information that is contained in dictionaries. For this, it is necessary to obtain a description of the signal through its features. The
vector obtained by the sparse representation simplifies the signal that can be used as a feature vector. Due to the dictionary’s training process, where more relevant elemental signals were selected, a feature-ranking process is not necessary. The
vector corresponding to
x must be evaluated to find the higher similitude between its features and the features of a specific set of signals, i.e., a dictionary in
. To perform features evaluation, it is necessary to obtain
and, to find the higher similitude,
x must be sparse by all the dictionaries in
. The OMP algorithm is used to sparse
x (Algorithm 1), with the learned dictionary for a class
, the input signal to classify
x and an error value
as parameters; a high value of
limits the level of signal decomposition. This process is repeated for each class; then, a set of feature vectors
is obtained. For classification, it is assumed that a dictionary with learned features of a particular class must recognize a signal of the same type more easily than other dictionaries, as reported in [
32]. One way of measuring the recognition of the signal that each dictionary performs is by assessing
coefficients. For instance, if
is a signal of class
, then the dictionary
will be able to represent the signal without generating high coefficients, because most of the
features are already contained in the elemental signals of
. Thus,
can be evaluated by the minimum sum of coefficients, as indicated in Equation (
3), and the class of the
i-th dictionary is the most likely class to be associated with signal
x. Moreover, having a trained dictionary composed of elemental signals that participate in the ECG decomposition without a specific ranking allows for a dynamic feature extraction process. For example, two samples belonging to the same class could be decomposed by combining different elemental signals from the dictionary. Their energy will be well-represented in their
vectors, since all the elemental signals in the dictionary were adapted for the same type of signal. In this way, a certain flexibility is reached in the feature selection, avoiding the use of both a fixed number of features and a fixed ranking.
For the classification stage, two experiments were performed under the common scheme and the multi-class scheme. To guarantee that signal selection in a classification experiment does not affect the final results, a two-fold cross-validation was computed, then repeated ten times. The obtained results under the proposed methodology were evaluated by using the accuracy (
) measure as presented in Equation (
4), where true positives (
), true negatives (
), false negatives (
), and false positives (
) were considered. Moreover, the results were also compared with those obtained in the related works.
Accuracy (
): the ratio of correct predictions to the total predictions.
The sparse representations of processed signals were tested under the common scheme (
Figure 9) that considers the normal and SCD signal classes.
Table 2 shows the results of one of the tests and its metrics. The results showed that, in general, the evaluation criterion (Equation (
3)) could identify a higher similitude between the input signal and its corresponding class, with an increased number of correct predictions. The accuracy (
) indicates that the correct classification of pre-SCD signals was higher than 90%. A general evaluation considering ten tests was performed to ensure the consistency of the results.
Table 3 shows the statistics of the ten tests, where a high accuracy and low dispersion were observed at each time interval. Nevertheless, in the common scheme comparison for the pre-SCD intervals, it is likely that a signal differing from the normal class would be detected as SCD without considering the degree of difference, i.e., lower in further pre-SCD intervals and higher in the nearest pre-SCD intervals. This condition may cause the precision to have slight variations, despite the changing time interval.
A comparison with previous reports that performed pre-SCD signal classification under the common scheme using the MIT/BIH NSR and MIT/BIH SCDH databases is presented in
Table 4. Data on the type of signal processed, methods, classifiers, and the prediction time, along with its respective accuracy, were also included. The comparison between these approaches and the proposed approach highlights the fact that the ECG signal is directly processed. Other methodologies used the HRV signal, but this increases the computational time, and a correction is required in the detection of R-R intervals [
7]. Moreover, feature ranking is a common task in other works. Still, it is a complicated process, as the behavior of some features may change over time, meaning one feature evaluation per minute is needed to identify which features better represent that specific interval [
19]. Since sparse representations provide a simplified description of the signal,
can be used as feature vector, avoiding feature ranking. Additionally, it was found that the normal and SCD signals can be identified with high precision using a simple criterion instead of a more sophisticated classifier. Acharya et al. [
19] also proved a simple evaluation by using the Sudden Cardiac Index (SCDI) to detect SCD up to 4 min before the onset. In previous works, it was proven that it is possible to reach an SCD detection up to 30 min before onset, with a high accuracy.
Although the traditional scheme (
Figure 9) allows for comparison with the state-of-the-art SCD prediction, it might not be suitable to compare only two classes: normal signals and SCD signals. These SCD signals belong to patients with a history of heart disease [
24]. Thus, the entire signal may behave differently than a normal signal, not just the signal in the minutes before an SCD event. For this reason, an experimental evaluation based on multiple classes was performed (
Figure 10). In this case, the classes were associated with the time intervals defined in
C. Since the features of the ECG signal change as the SCD gets closer, it is assumed that, by using different categories, local features (related with the proximity of SCD) could be highlighted, while common features (related to previous heart diseases) could be attenuated. In this way, the classification could be made more suitable.
Tests results under the proposed scheme are presented in
Table 5; a two-fold cross-validation was computed, and repeated ten times. Since a class of normal signals was included, an approximation of the general results can be cmade, using the common scheme evaluated in
Table 3. Unlike previous studies using ECG signals [
17,
18], it can be seen that the greater the distance from the start of an SCD event, the more difficult it is to predict the SCD with high accuracy. From the ten tests performed at the time intervals in
C, an average accuracy of 80.5% was obtained for an SCD event up to 30 min in advance. The purpose of the experimental evaluation is the comparison of SCD signals with the same conditions of a history of heart disease; therefore, this is an evaluation with more equal conditions.