Next Article in Journal
Investigation of the Effect of Physical Ability on the Fall Mitigation Motion Using the Combination of Experiment and Simulation
Previous Article in Journal
Yarrowia lipolytica CMGB32 Biosurfactants Produced Using n-Hexadecane: Developing Strategies for Environmental Remediation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prediction and Detection of Ventricular Fibrillation Using Complex Features and AI-Based Classification

1
Institute of Computer Science, Romanian Academy, Iasi Branch, 700481 Iasi, Romania
2
Faculty of Electronics, Telecomunications & Information Technology, Gheorghe Asachi Technical University of Iasi, 700050 Iasi, Romania
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(7), 3050; https://doi.org/10.3390/app14073050
Submission received: 6 March 2024 / Revised: 27 March 2024 / Accepted: 2 April 2024 / Published: 4 April 2024
(This article belongs to the Special Issue Advances in Biosignal Processing)

Abstract

:
We analyzed the possibility of detecting and predicting ventricular fibrillation (VF), a medical emergency that may put people’s lives at risk, as the medical prognosis depends on the time in which medical personnel intervene. Therefore, besides immediate detection of VF, the possibility of predicting VF 40 or even 50 min in advance was analyzed. For testing the proposed algorithm, we used ECG signals taken from the MIT-BIH database, namely, Malignant Ventricular Ectopy Database, Sudden Cardiac Death Holter Database and Normal Sinus Rhythm Database. The presented method is based on features extracted from the ECG signals in the time domain, frequency domain and complexity measures. For VF detection, the possibility of identifying the VF episode in the first 3 s after its occurrence was tested. For this, the first 3 s immediately after the appearance of VF were cut out and the features were computed on these sections. For VF prediction, 3 min of the ECG signal clipped 40 or 50 min before VF onset was used. Then, on these pieces of ECG signal, the specific features were calculated for 1 s segments. For the normal signal situation, 3 min was randomly selected from the database with normal ECGs. For the classification or detection stage, both an MLP-type neural network and the classifiers from the Machine Learning toolbox of the MATLAB® environment were used. The results obtained for both detection and classification are over 94% in both cases. The novelty of our results compared to those previously obtained is the time interval with which the possibility of prediction was analyzed, namely, 50 min in advance of the VF installation date. This means that the patient will be informed that it is possible to suffer a VF and has time to take the necessary measures to overcome a possible medical emergency.

1. Introduction

VF is a serious heart condition characterized by rapid and irregular contractions of the heart’s ventricles, which prevent blood from pumping through the body. VF is the most usual source of sudden cardiac death. Most events of VF take place during the first 48 to 72 h after a burst of signs. As a demonstration of ischemia, it is related to the absence of reperfusion in the infarct-associated artery [1].
VF can be classified into primary and nonprimary. Primary VF usually takes place in less than 48 h after myocardial infarction (MI). It is not related to heart failure or recurrent ischemia. Nonprimary VF designate all other episodes. VF is more abundant in subjects with MI complicated by heart failure or recurrent ischemia.
VF is fatal if not handled. It is considered that the survival rate decreases by approximately 10% per minute for patients after the onset of VF. Defibrillation is the most efficient therapy for VF. A biphasic waveform defibrillator, with a primer kick of 120 to 200 joules, is often a successful therapeutic device.
Sudden cardiac death is defined as an unexpected death within 24 h of the onset of symptoms or due to a sudden cardiovascular event without a known medical history. Sudden death can be caused by a variety of conditions, including VF, which is responsible for approximately 75% of sudden cardiac deaths (SCD) in adults. While certain heart conditions can predict the risk of sudden death, VF can occur without warning in patients with no known heart conditions. Early detection of VF is crucial to prevent sudden death and improve the patient’s chances of survival. Patients with VF must receive immediate treatment to restore normal heart rhythm and prevent serious complications. In addition, patients at high risk of developing VF should be monitored regularly to detect its early signs and prevent complications [2,3,4].
VF is detected by analyzing electrocardiographic signals (ECG). Traditionally, the ECG is continuously monitored to detect signs of ventricular fibrillation, but this process can be difficult and time-consuming, especially in patients who have rare or asymptomatic cardiac arrhythmias. A more efficient method of detecting ventricular fibrillation is the analysis of the ECG signal by means of signal processing algorithms. These algorithms can detect signs of ventricular fibrillation, even if they are hidden by ECG noise. Signal processing algorithms are currently used in most medical devices for monitoring patients with heart disease [5,6,7].
The use of artificial intelligence in the analysis of medical data or in the processing of biomedical signals is a field that has exploded in terms of the literature and a number of practical implementations in recent years. From monitoring bracelets to deep learning neural networks, from software systems to hardware implementations, from simple classification algorithms like KNN to deep learning neural networks, only the researchers’ imagination is the limit that can cause problems regarding the applicability of AI in the processing of medical data and their applicability with the aim of increasing life expectancy and patient compliance [8,9].
In the processing of the ECG signal, the extraction of important features is an essential step for the detection of ventricular fibrillation. These features may include peaks and valleys of the QRS complex, T wave duration, and QT interval, which are associated with certain types of arrhythmias. The correct extraction of these features can help identify ventricular fibrillation and avoid erroneous detection of other types of arrhythmias. In addition, the extraction of important features can be improved using artificial intelligence (AI) [10,11]. For example, machine learning algorithms can be trained to automatically identify and extract meaningful features from the ECG signal, which can reduce errors and improve the accuracy of ventricular fibrillation detection. In addition to the detection of ventricular fibrillation, AI can also be used to predict the occurrence of this arrhythmia. For example, automatic learning algorithms can be trained to detect changes in morphological parameters characteristic of the ECG signal or in parameters extracted in the time domain, frequency or parameters characterizing the complexity of the ECG signal [12,13,14].
Thus, in recent years, signal processing technology and the use of artificial intelligence in the detection and prediction of VF have significantly improved the ability of doctors to diagnose and treat this cardiac condition that represents a medical emergency.
When there is ventricular fibrillation, the electrocardiogram shows an irregular wave pattern with a frequency in the domain (150 cycles … 500 cycles)/minute and varying size. It does not exist as QRS complexes, ST segments, P or T waves. A reduction in adenosine triphosphate (ATP) level, which is the main origin of energy, can cause a great-wave VF to become a reduced-wave VF. This condition is associated with a small survival measure, as it indicates exhaustion of functional reserves and a decreased response to treatment. It is important to distinguish small-wave VF from asystole. To record a VF trace in a conscious patient, it is necessary to check the connections between the monitor and the defibrillator.
Various techniques have been proposed for detecting VF by processing electrocardiographic (ECG) signals. In the time domain, these methods include using thresholding methods [15], and the autocorrelation function. The conversion of the ECG signal into a binary one and assessing its complexity is an effective method as well. In the frequency domain, signal band-stop filtering, leakage estimation, and spectrum analysis methods also proved to be efficient. More recent techniques for detecting VF involve wavelet transform, neural networks, and support vector machines (SVMs). Combining characteristics that reflect the frequency and morphological features of the ECG proved to be an efficient method to detect VF [16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36].
In recent years, various methods have been deployed for the identification of VF and VT (in this last condition, the ECG shows a rate of greater than 120 beats per minute and at least three wide QRS complexes in a row). These algorithms are based on current techniques in signal processing and also on pattern recognition or classification by means of artificial intelligence (AI) techniques like deep learning [16,17,18,35]. However, the approaches which need high computational effort may be problematic in achievement on small instruments like fitness brackets or smart watches. Therefore, the usage of ECG traits that require a reduced number of calculations and a classifier with reduced computational requirements but leading to a classification rate close to that of complex algorithms can be a feasible solution. Thus, a successful method in hardware implementation may differ from an optimal method implemented in software. Successful practical implementations represent a compromise between software implementations with maximum success rates and hardware costs.
This paper proposes a study on a method of predicting a possible episode of VF 40 or 50 min in advance, as well as the immediate detection of an episode of VF. We considered that the 40 or 50 min interval for prediction is sufficient for the patient to take some measures to help him overcome the episode, measures such as warning the doctor to help him with defibrillation or medication. Also, the immediate detection of a VF episode is equally important because the chance of survival is inversely proportional to the interval between the installation of VF and the measures to help the patient overcome this episode [34,36].
The following section presents the features extracted from the analyzed ECG segments, the databases used for testing and their segmentation method for both VF detection and prediction, and the classifiers used. In Section 3, we present the main results obtained, these being presented separately for VF detection and for its prediction. Section 4 is dedicated to discussions regarding the results obtained compared to other papers, with the centralization of our own results as well as the literature in the field in a table. The final section is dedicated to the brief presentation of the idea pursued in this work, the results obtained and future directions.

2. Materials and Methods

For our study, we used a number of 26 features. These are features in the time domain, in the frequency domain and features that define the complexity of the signal and are extracted from non-linear analysis techniques such as Poincaré plot analysis, Hurst exponent and others.

2.1. Features

The time domain features contain the amplitude range (AR), peak-to-peak amplitude (PPA), mean amplitude (MA), median stepping increment (MSI), signal integral (SignInt), two definitions of the VF waveform root mean square (RMS) value, RMS1 and RMS2 [23], mean and median slope (MS and MdS) [24], and a smoothed nonlinear energy operator (SNEO) [25,33].
The spectral domain features were based on a 2048 point Fast Fourier Transform (FFT) of the Hamming windowed analysis interval and comprised the AMSA (the amplitude spectrum area), centroid frequency (CF), dominant or peak frequency (PF), energy (ENRG), spectral flatness measure (SFM), centroid power (CP), maximum power (MP) and power spectrum analysis (PSA) [24].
The complexity measures derived from nonlinear dynamics are the Hurst exponent (Hu) [26], the scaling exponent (ScE), the logarithm of the absolute correlations (LAC) [27], the median stepping increment (MSI) resulted from the Poincaré plot analysis [28] and two kinds of entropy: wavelet entropy (WE) [29] and spectral entropy (SpeEnt) [30].

2.2. Databases

For all the recordings in our study, we used only one derivation, namely, the first channel of the recordings from the 3 databases [37,38,39], which is a bipolar channel. The use of a single ECG channel for the prediction and detection of VF has the advantage of ease of acquiring the necessary ECG signal and of processing speed. We also mention that in the case of the MIT-BIH Sudden Cardiac Death Holter Database [38], the ECG recordings come from a Holter device. For the other two databases used [37,39], there are no detailed specifications regarding the acquisition system used.

2.2.1. The Database for the Detection of Ventricular Fibrillation

The MIT-BIH Malignant Ventricular Ectopy Database (VFDB) can be found on the Physionet.org portal [31,32,39]. It consists of 22 half-hour ECG recordings of subjects who experienced sustained ventricular tachycardia, ventricular flutter, and ventricular fibrillation. The database yields a reference comment containing just rhythm marks, with no beat marks or indexed beats. The annotations for pace changes are situated at the beginning of the event of the respective rhythm, and there are 15 distinct tags used in the database, including atrial fibrillation (AFIB), asystole (ASYS), ventricular bigeminy (B), first-degree heart block (BI), high-grade ventricular ectopic activity (HGEA), normal sinus rhythm (N or NSR), nodal (“AV junctional”) rhythm (NOD), noise (NOISE), pacemaker (paced rhythm) (PM), sinus bradycardia (SBR), supraventricular tachyarrhythmia (SVTA), ventricular escape rhythm (VER), ventricular fibrillation (VF or VFIB), ventricular flutter (VFL), and ventricular tachycardia (VT). The ECG signals were acquired using a sampling frequency of 250 Hz.

2.2.2. The Database for Forecast of Ventricular Fibrillation

The MIT-BIH Normal Sinus Rhythm (NSR) database comprises 18 extended ECG recordings of 18 individuals, 5 of whom are males aged between 26 and 45, and 13 females aged between 20 and 50. None of the subjects in this database exhibited any significant arrhythmias. These initial recordings were sampled with 128 Hz, and the database contains files with annotations indicating the position of the R waves for all 18 ECG recordings [31,37].
The MIT-BIH Sudden Cardiac Death Holter Database (SCDH) [38] is a collection of 23 complete Holter recordings that include data from 18 patients with underlying NSR (4 with discontinuous pacing), 1 with continually paced, and 4 with atrial fibrillation. All patients in the database had a constant ventricular tachyarrhythmia, and most of them had experienced true cardiac arrests. As stated, the sampling frequency was 250 Hz, and exact annotations of the position of the R wave and the beginning of the SCD episode do exist. However, annotating these files is especially challenging due to the complexity of the cardiac rhythms included. In our study, we excluded three recordings from this database due to changes in the ECG signal that were not consistent with an SCD or VF episode [31,38].

2.3. Segmentation of ECG Recordings

2.3.1. Segmentation for the Detection of Ventricular Fibrillation

This procedure is based on database comments, specifically 750 samples (summing 3 s) from the beginning of each beat modification [34]. The 26 features are then computed on these ECG segments. The features used are those presented previously in Section 2.1. Figure 1 displays examples of ECG episodes from different classes. Table 1 shows the separation of ECG sections into the 15 groups.

2.3.2. Segmentation of ECG Recordings and Building Database for Forecast of Ventricular Fibrillation

Two kinds of cardiac signals were analyzed, a normal type and a category with ECG recorded prior to the occurrence of VF. From these segments, features related to time, frequency, and complexity of the signals were taken out.
For the NSR ECG signals, 3 min ECG periods were randomly extracted from all 18 ECG registrations in the NSR category. These episodes were then cut into 3 s segments, and features were computed on these sections.
ECG signals that forecast the onset of VF, episodes with a length of 3 min, 40 and 50 min, respectively, before the VF event were selected from the SCDH database. These segments were also split into 3 s pieces [36].
As a result, there were 18 patients in the normal class, each associated with 60 segments of 3 s, i.e., 1080 NSR ECG segments. Concerning the part that forecasts VF, there were 20 subjects, each associated with 60 segments of 3 s, totaling 1200 segments.

2.3.3. The Classifiers

We tested several classifiers for classification or prediction. The scope of using multiple classifiers was to accomplish a more thorough analysis and to validate the proposed method and the features used. In practice, there is often a choice between several classifiers, and the decision is taken using the classification outcomes and the available hardware means for accomplishment [40,41].
We compared an MLP-type neural network with all the available classifiers in the Machine Learning toolbox of the MATLAB® environment (2011b). The results for these classifiers were obtained using the default settings ensured by MATLAB®, without any extra adjustments of the parameters.

3. Results

3.1. Results for the Detection of Ventricular Fibrillation

To detect ventricular fibrillation using VFDB database annotations, we segmented the ECG recordings and divided the ECG signals into 3 s segments. We chose the ECG segmentation duration of 3 s for two reasons: first, to use a substantial database for both train and test, and second, to quickly detect the onset of ventricular fibrillation requiring immediate assistance and medical treatment, as it represents severe arrhythmia episodes. We calculated the previously mentioned characteristics on these segments.
We performed a two-class classification to detect ventricular fibrillation. The segments that belong to the VF class were marked as class 1, while the rest were classified as the other class. Using MLP, we achieved classification accuracies ranging between 91% and 92%, in the function of the network structure. Other classifiers available in MATLAB® were also tested, and some of the best results obtained are shown in Table 2.
Thus, with an ensemble of bagged trees type classifiers, we obtained a classification accuracy of 94.6%. bagging trees builds different models using the sample subset and then aggregates the predictions of the different models to reduce the variance. Considering that VF is often preceded by VT and VFL, we took out additional classes from the database, including VFL, VT, noise, and AFIB. With this approach, using five classes, we achieved a classification accuracy of 89.9% with an ensemble of classifiers.
As soon as the AFIB class was added, the classification accuracy was close to the above value, achieving 90.4% when the SVM classifier was used. The overall classification rate for all 15 classes, which covers the entire database, was 89.5%. These high classification rates on multiple classes demonstrate that the chosen features are significant and can effectively discriminate between those classes.
Since the problem of classification into several classes is a complex one, thus requiring a more detailed analysis [42], in addition to the classification rate, other parameters such as Recall, Specificity, Error Rate, Precision, and F1 score were calculated. In addition, there are many variants of cross-validation: Venetian Blinds, Contiguous Blocks, Random Subsets, leave-one-out, leave-many-out [43,44], etc. We tested the classification with cross-validation with leave-one-out (with five folds). The results obtained in all cases were very close, so we chose to report the average results obtained after 5 runs.
To analyze the performance of different classifiers on classification problems with two, five, six, and fifteen classes, we used the rank aggregation concept with two criteria: mean and weighted mean, based on [45]. For the weighted mean, we used the classification errors as weights by multiplying element by element the values from the ranking matrix obtained based on the rank of each classifier for each classification problem. Better rankings correspond to smaller numbers. The results obtained for aggregated ranks (scores) are presented in the last lines of Table 2.
Figure 2 shows the confusion matrix and design architecture for the classification in two classes that is for VF detection with an MLP with 36 neurons on the hidden layer. This neural network was tested with 3000 examples, unused in the training phase.
Figure 3 presents the classification results in the case of various classifiers that were tested with the Machine Learning toolbox of the MATLAB® environment. For classifiers such as KNN, SVM, and others, their training and testing stages can be carried out using the cross-validation technique. One can obtain a confusion matrix having the same number of elements as the existing samples in the database. It is found that the best classification rate (in our case representing the VF detection rate) is obtained with an ensemble of classifiers of the Bagger Trees type when a result of 94.6% is obtained. For neural networks, we used three distinct data sets, namely, training, validation and testing sets. That is, the data used for testing were not used for training. However, several series of training and testing were carried out, and the reported results represent their average.
Figure 4 presents the classification results for various classifiers in MATLAB® with the Machine Learning toolbox. There is a decrease in the classification rate by a few percentages compared to the classification in two classes. The best results were obtained with an ensemble of classifiers, namely, a classification rate of 89.9%. On the confusion matrix, it can be seen that the five classes are not evenly distributed, but a uniform classification rate is observed for the five classes.
In Figure 5, the classification results for MLP with 40 neurons on the hidden layer are presented. The confusion matrix of the test set shows a classification rate of 85.4%, with a close distribution of the five classes in terms of classification rates. Distribution of the data between the three sets, the training set, the validation set, and the test set, was 70–15–15%, respectively.
Adding the atrial fibrillation class (AFIB) to the five classes (Figure 6) did not change the classification results much for most of the MATLAB® classifiers (from Machine Learning toolbox) and the MLP network. The main change, however, for the classification in these six classes is the maximum classification rate that is obtained with SVM and which is 90.4%. The explanation is that cubic SVM classifies this new class very well, and the number of examples in this class is second in terms of data distribution, but close to all other pathological classes.
The classification for all 15 classes existing in the database led to classification results close to those for 5 and 6 classes and slightly lower compared to the classification between the normal and the rest. Since the data distribution among the 15 classes is not uniform, a more careful analysis of the results is necessary. Thus, in Figure 7, we present the confusion matrix for classification with the SVM classifier. It is found that the classification rate is similar for all 15 classes and on average is 89.5% with SVM. For an ensemble of classifiers, we obtained a classification of 89.2% and for KNN, a classification of 86.1%. The elements of the confusion matrix (i.e., the numbers in Figure 7) represent the number of examples. In addition to five-fold cross-validation, we also tested other validation options, namely, ten-fold cross-validation and holdout validations with 20, 30, 40 and 50% held out, respectively. We found that the results are very close, regardless of the cross-validation method. The results obtained with cubic SVM are presented in Table 3.

3.2. Results for Forecast of Ventricular Fibrillation

In the case of predicting VF episodes, the aim was to analyze the relevance of features extracted from ECG signal segments taken 20, 30, 40 or 50 min in advance of VF episodes compared to ECG signal segments without heart disease. At the same time, we tested several classifiers on the same data to validate the method and to check which the most suitable classifier is.
The relevance of the extracted features actually represents the ability to predict episodes of VF, prediction made by classifying the examples into two classes, namely, the normal class vs. the class that anticipates a VF.
Table 4 displays the outcomes obtained for different moments in time. Very good results are found for all of these predictions. The purpose of our study is not to predict the moment when a subject will make FV, but the goal is to warn her/him that in the next hour, it is possible to suffer FV.
Figure 8 presents the classification results from 40 min in advance of the time of FV installation with all classifiers accessible in MATLAB®. All classifiers demonstrated good results of over 88%, with the best results exceeding 99% coming from an ensemble of classifiers.
We achieved excellent results of over 95% for both 40 min and 50 min advance predictions using a Multi-Layer Perceptron (MLP) with a hidden layer consisting of 10 neurons and with 26 neurons on the input layer [36].
In Table 5, which presents the confusion matrix, it is found that the classification rate is approximately the same for each of the two classes. The classification rate with the MLP network is 95.3% for 40 min in advance and 96.1% for 50 min in advance compared to VF.
For a more thorough analysis, we conducted predictions using ECG recordings obtained exclusively from the SCDH database. In order to establish a category of “normal” segments—segments that do not indicate a ventricular fibrillation (VF) event—we extracted 3 min intervals occurring 50 min after the onset of the VF episode, assuming the VF episode had concluded by then. The selection of a 50 min interval was based on empirical data. However, it is crucial to acknowledge that the less favorable outcomes depicted in Figure 9 should be interpreted with caution due to our inability to accurately label the segments occurring 50 min post-VF event. There remains a possibility that some of these subjects experienced VF recurrence later, notwithstanding our classification of these segments as normal [36]. Moreover, this analysis was also carried out by segmenting 30, 40 and 50 min, respectively, in advance (Table 6).
For the case “50 min before the episode of VF vs. 50 min after the VF episode”, the confusion matrix for an ensemble of classifiers (type bagged trees) is presented in Figure 9. A very close rate is found for the two classes with a total classification rate of 90.3%.
For the same data, i.e., only data from the SCDH database, we tested an MLP-type neural network with a predefined number of neurons on the hidden layer. We compared the results with a neural network in which the number of neurons on the hidden layer and other network parameters were automatically found by the hyperparameters optimization technique with the help of the bayesopt function (bayesopt function selects optimal machine learning hyperparameters using Bayesian optimization). The obtained results are presented in Table 7 [36]. It is found that improved results are obtained through this optimization technique compared to the variant in which the number of neurons and other parameters specific to the architecture of the neural network used are manually set empirically. However, the results obtained with a simple MLP type network are lower compared to those obtained with an ensemble of classifiers (bagged trees).

4. Discussion

Our VF detection and VF episode prediction results were compared with other results from the specialized literature. Thus, in Table 8, these results are presented and compared with those obtained by us. It is found that both in the case of VF detection and in the case of VF prediction, the results of the method proposed by us are better or at least comparable. It depends on the classifier we use. Thus, the best results which are superior to the other methods are those obtained with ensembles of classifiers. The robustness of the presented method, that is, of the segmentation and with features extracted and used in the case of VF detection or prediction, is demonstrated by the very good results obtained with most of the tested classifiers.
For a fair comparison, the results of the methods that were tested on ECG recordings that also came from the MIT-BIH database were retrieved. Thus, in Table 8, the results presented are those of some methods that used the same databases as those used by us.
The advantage of the method proposed by us is that very good VF detection results are obtained even from the first 3 s of its installation. For the prediction part, the advantage of the method is that the method is able to predict the installation of a VF 40 or 50 min in advance.
In the methods presented in Table 8, there are generally methods that use features related to those used by us or similar classifiers or anticipation/detection time windows similar to ours. Using a Boltzmann network and time-frequency features extracted from the preprocessed ECG signal, the authors of the article [1] detect ventricular fibrillation. In paper [2], the possibility of establishing a set of parameters was analyzed to ensure both the reliable detection of shock-susceptible rhythms and an adequate prediction of shock success. A set of 10 features was used, reflecting the frequency characteristics, variations, complexity, periodicity and symmetry of the ECG signals. In paper [3], an algorithm for VF/VT detection is proposed using a band-pass digital filter with integer coefficients, which is very simple to implement in real-time operation. A sensitivity of 95.93% and a specificity of 94.38% were obtained. Using the same database as us, the authors of article [5] use approximate entropy, obtaining classification results (Acc = 91.0%) close to those obtained by us with MLP (91.8%) and lower than ours obtained with an ensemble of classifiers (94.6%). Using a reduced data set and approximate entropy with Empirical Mode Decomposition (EMD), the authors of article [6] report a classification of 91.2%. Very good results (Acc = 96.3%) were also reported in [16] when an SVM and a 2 s window was used, but with the mention that the signals come from different sources, namely, AHA and MYTH-BIH. In [8], using a type-2 fuzzy logic-based classifier for a three class multiclass classification (VF, VT and Normal) obtained good accuracy ratios (Acc(VF) = 90.9%). In [12], using a number of 17 traits, results of Acc = 94.79% were obtained when distinguishing between VF category and non-VF category. In [13], there were 13 parameters used, accounting for temporal, spectral, and complexity features of the ECG signal, using an SVM to distinguish between VF and non-VF categories with Sens = 95% and Spe = 99%. In [14], using six features from the frequency domain, nonlinear characteristics domain and using binary decision tree or the SVM, Acc = 94.2% and Acc = 89.3% were obtained, respectively. In [15], using digital Taylor–Fourier transform (DTFT) features and a least square support vector machine (LS-SVM) with linear and radial basis function (RBF), kernels obtained performance values of Acc = 83.75%.
In paper [20], using boosted classification and regression tree (Boosted-CART) on six features for a binary VFVT and non-VFVT classification, a classification of Acc = 98.29% was obtained. To test the method proposed by the authors, three databases were used (Creighton University Ventricular Tachyarrhythmia Database—CUDB, the MIT-BIH Malignant Ventricular Arrhythmia Database—VFDB and the MITBIH arrhythmia database—MITDB) totaling 1888 VT/VF samples and 27,992 non-VT/VF samples. Thus, the good classification results can be explained by the advantage offered by a very large database used for training. Another major difference is the size of the signal window, which in the case of the article [20] is 5 s, compared to our segmentation which is 3 s.
In paper [21], two input data to the classifier are evaluated: TDA features and Persistence Diagram Image (PDI). Using the reduced TDA-obtained features, a high average accuracy near 99% was observed when discriminating four types of rhythms and specificity values higher than 97.16% in all cases. The very good results are due to the feature selection block used, namely, the Sequential Forward Selection (SFS) method. Thus, from 79 initial features, a total of 27 features from all representations (time domain, RPC, PDR, LR, and SR) were selected. This selection improves computational efficiency and reduces the model’s generalization error by removing irrelevant features or noise.
In [22], a number of 13 time-frequency and statistical features were extracted and applied to the C4.5 classifier, resulting in classifications of Acc = 97.02%, Sens = 90.97%, Spe = 97.86% for VFVT detection but with the observation that ventricular flutter is also included in this reported statistic.
In paper [24], it is shown that various simple VF features, such as median slope, already reach the maximum prediction power extractable from VF ECG and are not sufficient to make a VF prediction with good results. In paper [25], the Smoothed Nonlinear Energy Operator (SNEO) is applied to analyze the energy content of the pre-shock ventricular fibrillation (VF) waveform acquired by automated external defibrillators (AEDs), and using SNEO as a shock outcome predictor, the minimum pre-shock segment duration (5-s segments) was determined. In paper [26], the predictive power of a model developed by ‘genetic’ programming (GP) to predict defibrillation success was studied. The maximal amplitude, total energy of power spectral density, and the Hurst exponent of the VF electrocardiogram (ECG) signal were extracted and included in the model developed by GP.

5. Conclusions

We presented a broader analysis of the detection of ventricular fibrillation (VF) and the possibility of its prediction. The detection and prediction methods presented are based on the use of features in the time and frequency domains and the use of waveform complexity indices from nonlinear dynamics.
For the case of VF detection, we used the MIT-BIH Malignant VFDB, and the analysis included the grouping of 3 s ECG segments into five and six classes for the identification of VF. In addition to this classification, they were also classified into all 15 classes present in the database with which VF detection was tested. The detection accuracy of changes in the normal sinus rhythm, that is, the accuracy of classifying into two groups, is related to the type of the classifier used. Specifically, the ensemble classifier achieves a detection rate of 94.6%, while the MLP achieves a detection rate of 91.8%. The classification accuracy for 15 classes by means of the SVM classifier was 89.2% and 89.5% with an ensemble of classifiers. The identification accuracy for six classes (normal, VF, VFL, VT, Noise, AFIB) using the SVM machine was 90.3%.
For the case of VF prediction, we used two databases from MIT-BIH, the NSR database and SCDH. The testing was carried out both on ECG segments from both databases and only for the SCDH database. Thus, for an MLP, a forecast rate of over 95% was achieved. Moreover, with an ensemble of classifiers, VF can be predicted with an accuracy of over 99%, which is one of the greatest values reported in the literature. The achieved outcomes show that VF can be forecasted 40 and even 50 min before. To validate the proposed method, an additional test was carried out on SCDH recordings. This testing was carried out on ECG segments cut 50 min before VF and 50 min after VF, the latter being considered as normal segments, which would not predict VF. For this case, when only SCDH databases were used, we obtained prediction results of 90.3% with an ensemble of classifiers and 87.3% with MLP. According to our knowledge, this accuracy of 90.3% is the best result of VF prediction at 50 min before its first episode.
In conclusion, the proposed methodology provides useful information for the detection of VF in real time with a reduced computation time, discriminating satisfactorily this type of arrhythmia from other cardiac pathologies. Also, the proposed method is able to predict with an advance of 40 or even 50 min before the installation of a VF event.

Author Contributions

Conceptualization, M.F., H.-N.C. and L.G.; methodology, M.F.; software, M.F.; validation, M.F., H.-N.C. and L.G.; formal analysis, M.F.; investigation, M.F.; resources, M.F. and H.-N.C.; data curation, M.F.; writing—original draft preparation, M.F., H.-N.C. and L.G.; writing—review and editing, M.F., H.-N.C. and L.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are openly available in [physionet] at [10.13026/C2W306 and 10.13026/C22P44 and 10.13026/C2NK5R], reference number [33,38,39]. The webpage of the MIT-BIH Database is “https://physionet.org/content/sddb/1.0.0/”, https://physionet.org/content/vfdb/1.0.0/ and https://www.physionet.org/content/nsrdb/1.0.0/ (accessed on 1 March 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Mjahad, A.; Rosado-Muñoz, A.; Guerrero-Martinez, J.; Bataller-Mompean, M.; Frances-Villora, J.V. ECG, Analysis for Ventricular Fibrillation Detection Using a Boltzmann Network. In Proceedings of the VI Latin American Congress on Biomedical Engineering CLAIB 2014, Parana, Argentina, 29–31 October 2014; Braidot, A., Hadad, A., Eds.; Springer: Cham, Switzerland, 2015; Volume 49, pp. 532–535. [Google Scholar]
  2. Jekova, I. Shock advisory tool: Detection of life threatening cardiac arrhythmias and shock success prediction by means of a common parameter set. Biomed. Signal Process. Control 2007, 2, 25–33. [Google Scholar] [CrossRef]
  3. Jekova, I.; Krasteva, V. Real time detection of ventricular fibrillation and tachycardia. Physiol. Meas. 2004, 25, 1167. [Google Scholar] [CrossRef] [PubMed]
  4. Srinivasan, N.T.; Schilling, R.J. Sudden Cardiac Death and Arrhythmias. Arrhythm. Electrophysiol. Rev. 2018, 7, 111–117. [Google Scholar] [CrossRef] [PubMed]
  5. Xie, H.B.; Zhong-Mei, G.; Liu, H. Classification of Ventricular Tachycardia and Fibrillation Using Fuzzy Similarity-based Approximate Entropy. Expert Syst. Appl. 2011, 38, 3973–3981. [Google Scholar] [CrossRef]
  6. Kaur, L.; Singh, V. Ventricular Fibrillation Detection using Empirical Mode Decomposition and Approximate Entropy. Int. J. Emerg. Technol. Adv. Eng. 2013, 3, 260–268. [Google Scholar]
  7. Ibaida, A.; Khalil, I. Distinguishing between Ventricular Tachycardia and Ventricular Fibrillation from Compressed ECG Signal in Wireless Body Sensor Networks. In Proceedings of the 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology, Buenos Aires, Argentina, 31 August–4 September 2010; pp. 2013–2016. [Google Scholar]
  8. Tan, W.; Foo, C.L.; Chua, T.W. Type-2 Fuzzy System for ECG Arrhythmic Classification. In Proceedings of the 2007 IEEE International Fuzzy Systems Conference, London, UK, 23–26 July 2007; pp. 1–6. [Google Scholar]
  9. Phong, P.A.; Thien, K.Q. Classification of Cardiac Arrhythmias Using Interval Type-2 TSK Fuzzy System. In Proceedings of the 2009 International Conference on Knowledge and Systems Engineering, Hanoi, Vietnam, 13–17 October 2009; pp. 1–6. [Google Scholar]
  10. Fira, M. Detection of P300 in a BCI Speller. In Convergence and Hybrid Information Technology. ICHIT 2011. Communications in Computer and Information Science; Lee, G., Howard, D., Ślęzak, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 206. [Google Scholar]
  11. Fira, M.; Goras, L. A New Method for EEG Compressive Sensing. Adv. Electr. Comput. Eng. 2012, 12, 71–76. [Google Scholar] [CrossRef]
  12. Verma, A.; Dong, X. Detection of Ventricular Fibrillation Using Random Forest Classifier. Biomed. Sci. Eng. 2016, 9, 259–268. [Google Scholar] [CrossRef]
  13. Alonso-Atienza, F.; Morgado, E.; Fernandez-Martínez, L.; Garcia-Alberola, A.; Rojo-Alvarez, J. Detection of Life-Threatening Arrhythmias Using Feature Selection and Support Vector Machines. IEEE Trans. Biomed. Eng. 2014, 61, 832–840. [Google Scholar] [CrossRef] [PubMed]
  14. Hajeb-Mohammadalipour, S.; Ahmadi, M.; Shahghadami, R.; Chon, K. Automated Method for Discrimination of Arrhythmias Using Time, Frequency, and Nonlinear Features of Electrocardiogram Signals. Sensors 2018, 18, 2090. [Google Scholar] [CrossRef]
  15. Tripathy, R.K.; Zamora-Mendez, A.; de la O Serna, J.A.; Paternina, M.R.A.; Arrieta, J.G.; Naik, G.R. Detection of Life Threatening Ventricular Arrhythmia Using Digital Taylor Fourier Transform. Front. Physiol. 2018, 9, 722. [Google Scholar] [CrossRef] [PubMed]
  16. Li, Q.; Rajagopalan, C.; Clifford, G.D. Ventricular fibrillation and tachycardia classification using a machine learning approach. IEEE Trans. Biomed. Eng. 2013, 61, 1607–1613. [Google Scholar] [PubMed]
  17. Acharya, U.R.; Fujita, H.; Lih, O.S.; Hagiwara, Y.; Tan, J.H.; Adam, M. Automated detection of arrhythmias using different intervals of tachycardia ECG segments with convolutional neural network. Inf. Sci. 2017, 405, 81–90. [Google Scholar] [CrossRef]
  18. Ibtehaz, N.; Rahman, M.S.; Rahman, M.S. VFPred: A fusion of signal processing and machine learning techniques in detecting ventricular fibrillation from ECG signals. Biomed. Signal Process. Control 2019, 49, 349–359. [Google Scholar] [CrossRef]
  19. Xia, D.; Meng, Q.; Chen, Y.; Zhang, Z. Classification of ventricular tachycardia and fibrillation based on the lempel-ziv complexity and EMD. In International Conference on Intelligent Computing; Springer: Berlin/Heidelberg, Germany, 2014; pp. 322–329. [Google Scholar]
  20. Xu, Y.; Wang, D.; Zhang, W.; Ping, P.; Feng, L. Detection of ventricular tachycardia and fibrillation using adaptive variational mode decomposition and boosted-cart classifier. Biomed. Signal Process. Control. 2018, 39, 219–229. [Google Scholar] [CrossRef]
  21. Mjahad, A.; Frances-Villora, J.V.; Bataller-Mompean, M.; Rosado-Muñoz, A. Ventricular Fibrillation and Tachycardia Detection Using Features Derived from Topological Data Analysis. Appl. Sci. 2022, 12, 7248. [Google Scholar] [CrossRef]
  22. Mohanty, M.; Sahoo, S.; Biswal, P.; Sabut, S. Efficient classification of ventricular arrhythmias using feature selection and C4. 5 classifier. Biomed. Signal Process. Control 2018, 44, 200–208. [Google Scholar] [CrossRef]
  23. He, M.; Gong, Y.; Li, Y.; Mauri, T.; Fumagalli, F.; Bozzola, M.; Ristagno, G. Combining multiple ECG features does not improve prediction of defibrillation outcome compared to single features in a large population of out-of-hospital cardiac arrests. Crit Care 2015, 19, 425. [Google Scholar] [CrossRef]
  24. Neurauter, A.; Eftestøl, T.; Kramer-Johansen, J.; Abella, B.S.; Sunde, K.; Wenzel, V.; Lindner, K.H.; Eilevstjønn, J.; Myklebust, H.; Steen, P.A.; et al. Prediction of countershock success using single features from multiple ventricular fibrillation frequency bands and feature combinations using neural networks. Resuscitation 2007, 73, 253–263. [Google Scholar] [CrossRef]
  25. Chicote, B.; Irusta, U.; Aramendi, E.; Isasi, I.; Alonso, D.; Vicente, F.; Sanchez, M. Nonlinear energy operators for defibrillation shock outcome prediction. In Proceedings of the 2016 Computing in Cardiology Conference (CinC), Vancouver, BC, Canada, 11–14 September 2016; pp. 61–64. [Google Scholar]
  26. Podbregar, M.; Kovacic, M.; Podbregar-Mars, A.; Brezocnik, M. Predicting defibrillation success by ‘genetic’ programming in patients with out-of-hospital cardiac arrest. Resuscitation 2003, 57, 153–159. [Google Scholar] [CrossRef]
  27. Sherman, L.D.; Rea, T.D.; Waters, J.D.; Menegazzi, J.J.; Callaway, C.W. Logarithm of the absolute correlations of the ECG waveform estimates duration of ventricular fibrillation and predicts successful defibrillation. Resuscitation 2008, 78, 346–354. [Google Scholar] [CrossRef] [PubMed]
  28. Gong, Y.; Lu, Y.; Zhang, L.; Zhang, H.; Li, Y. Predict Defibrillation Outcome Using Stepping Increment of Poincare Plot for Out-of-Hospital Ventricular Fibrillation Cardiac Arrest. Biomed. Res. Int. 2015, 2015, 493472. [Google Scholar] [CrossRef] [PubMed]
  29. Rosso, O.A.; Blanco, S.; Yordanova, J.; Kolev, V.; Figliola, A.; Schürmann, M.; Başar, E. Wavelet entropy: A new tool for analysis of short duration brain electrical signals. J. Neurosci. Methods 2001, 105, 65–75. [Google Scholar] [CrossRef] [PubMed]
  30. Eftestol, T.; Sunde, K.; Ole Aase, S.; Husoy, J.H.; Steen, P.A. Predicting outcome of defibrillation by spectral characterization and nonparametric classification of ventricular fibrillation in patients with out-of-hospital cardiac arrest. Circulation 2000, 102, 1523–1529. [Google Scholar] [CrossRef] [PubMed]
  31. Greenwald, S.D. Development and Analysis of a Ventricular Fibrillation Detector. Master’s Thesis, MIT Dept. of Electrical Engineering and Computer Science, Cambridge, MA, USA, 1986. [Google Scholar]
  32. Goldberger, A.; Amaral, L.; Glass, L.; Hausdorff, J.; Ivanov, P.C.; Mark, R.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef] [PubMed]
  33. Chicote, B.; Irusta, U.; Aramendi, E.; Alcaraz, R.; Rieta, J.J.; Isasi, I.; Alonso, D.; Baqueriza, M.D.M.; Ibarguren, K. Fuzzy and Sample Entropies as Predictors of Patient Survival Using Short Ventricular Fibrillation Recordings during out of Hospital Cardiac Arrest. Entropy 2018, 20, 591. [Google Scholar] [CrossRef] [PubMed]
  34. Fira, M.; Costin, H.; Goras, L. Analysis of the Detection of Ventricular Fibrillation in its First 3 Seconds using Different Features and Classifiers. In Proceedings of the IEEE 10th Int. Conference on E-Health and Bioengineering—”EHB 2022”, Iasi, Romania, 17–18 November 2022. [Google Scholar]
  35. Tseng, L.-M.; Tseng, V.S. Predicting Ventricular Fibrillation through Deep Learning. IEEE Access 2020, 8, 221886–221896. [Google Scholar] [CrossRef]
  36. Fira, M.; Goras, L. On Database, Segmentation and Classifier Influence in Ventricular Fibrillation Detection. In Proceedings of the IEEE 16-th International Symposium on Signals, Circuits and Systems—ISSCS 2023, Iasi, Romania, 13–14 July 2023. [Google Scholar]
  37. Available online: https://www.physionet.org/content/nsrdb/1.0.0/ (accessed on 1 March 2023).
  38. Available online: https://physionet.org/content/sddb/1.0.0/ (accessed on 1 March 2023).
  39. Available online: https://physionet.org/content/vfdb/1.0.0/ (accessed on 1 March 2023).
  40. Muñoz-Gil, G.; Garcia-March, M.A.; Manzo, C.; Martín-Guerrero, J.D.; Lewenstein, M. Single trajectory characterization via machine learning. New J. Phys. 2020, 22, 013010. [Google Scholar] [CrossRef]
  41. Thapa, S.; Lomholt, M.A.; Krog, J.; Cherstvy, A.G.; Metzler, R. Bayesian analysis of single-particle tracking data using the nested-sampling algorithm: Maximum-likelihood model selection applied to stochastic-diffusivity data. Phys. Chem. Chem. Phys. 2018, 20, 29018–29037. [Google Scholar] [CrossRef] [PubMed]
  42. Rücker, C.; Rücker, G.; Meringer, M. y-Randomization and its variants in QSPR/QSAR. J. Chem. Inf. Model. 2007, 47, 2345–2357. [Google Scholar] [CrossRef] [PubMed]
  43. Filzmoser, P.; Liebmann, B.; Varmuza, K. Repeated double cross validation. J. Chemom. 2009, 23, 160–171. [Google Scholar] [CrossRef]
  44. Bro, R.; Kjeldahl, K.; Smilde, A.K.; Kiers, H.A.L. Cross-validation of component models: A critical look at current methods. Anal. Bioanal. Chem. 2008, 390, 1241–1251. [Google Scholar] [CrossRef]
  45. Nejc Ilc. Rank Aggregation, MATLAB Central File Exchange. 2024. Available online: https://www.mathworks.com/matlabcentral/fileexchange/41835-rank-aggregation (accessed on 25 March 2024).
Figure 1. Shapes of ECG episodes.
Figure 1. Shapes of ECG episodes.
Applsci 14 03050 g001
Figure 2. The confusion matrix for a 2-class classification (VF vs. another class) and the structure of the MLP neural network (Recall = 89.10%; Specificity = 93.68%; Error Rate = 8.23%; Precision = 90.74%; F1 score = 89.98%).
Figure 2. The confusion matrix for a 2-class classification (VF vs. another class) and the structure of the MLP neural network (Recall = 89.10%; Specificity = 93.68%; Error Rate = 8.23%; Precision = 90.74%; F1 score = 89.98%).
Applsci 14 03050 g002
Figure 3. Results for various classifiers in the 2 classes and confusion matrix for 2-class classification (VF vs. another class) for classification with an ensemble of classifiers (Recall = 94.86%; Specificity = 94.29%; Error Rate = 4.10%; Precision = 95.99%; F1 score = 95.56%). Class VFL: Recall = 83.21%; Specificity = 98.36%; Error Rate = 1.67%; Precision = 76.34%; F1 score = 79.63%; Class normal: Recall = 96.62%; Specificity = 93.72%; Error Rate = 1.09%; Precision = 97.50%; F1 score = 97.06%; Class NOISE: Recall = 91.17%; Specificity = 96.69%; Error Rate = 1.81%; Precision = 80.55%; F1 score = 85.51%; Class VT: Recall = 96.77%; Specificity = 98.20%; Error Rate = 1.02%; Precision = 80.81%; F1 score = 88.21%; Class VF: Recall = 84.67%; Specificity = 98.79%; Error Rate = 1.17%; Precision = 77.65%; F1 score = 80.93%.
Figure 3. Results for various classifiers in the 2 classes and confusion matrix for 2-class classification (VF vs. another class) for classification with an ensemble of classifiers (Recall = 94.86%; Specificity = 94.29%; Error Rate = 4.10%; Precision = 95.99%; F1 score = 95.56%). Class VFL: Recall = 83.21%; Specificity = 98.36%; Error Rate = 1.67%; Precision = 76.34%; F1 score = 79.63%; Class normal: Recall = 96.62%; Specificity = 93.72%; Error Rate = 1.09%; Precision = 97.50%; F1 score = 97.06%; Class NOISE: Recall = 91.17%; Specificity = 96.69%; Error Rate = 1.81%; Precision = 80.55%; F1 score = 85.51%; Class VT: Recall = 96.77%; Specificity = 98.20%; Error Rate = 1.02%; Precision = 80.81%; F1 score = 88.21%; Class VF: Recall = 84.67%; Specificity = 98.79%; Error Rate = 1.17%; Precision = 77.65%; F1 score = 80.93%.
Applsci 14 03050 g003
Figure 4. Results for various classifiers in the 5 classes (normal, VF, VFL, VT, Noise) and the confusion matrix for classification in 5 classes with ensemble of classifiers.
Figure 4. Results for various classifiers in the 5 classes (normal, VF, VFL, VT, Noise) and the confusion matrix for classification in 5 classes with ensemble of classifiers.
Applsci 14 03050 g004
Figure 5. Results for various classifiers in 5 classes and the confusion matrix for classification in 5 classes with MLP with 40 neurons on the hidden layer.
Figure 5. Results for various classifiers in 5 classes and the confusion matrix for classification in 5 classes with MLP with 40 neurons on the hidden layer.
Applsci 14 03050 g005
Figure 6. Results for various classifiers in the 6 classes (normal, VF, VFL, VT, Noise, AFIB) and the confusion matrix for classification in 6 classes with SVM (with global parameters Recall: 27.89%; Specificity: 86.88%; Error Rate: 72.11%; Precision: 83.14%; F1 Score: 41.53%). Class VFL: Recall = 23.04%; Specificity = 93.66%; Error Rate = 6.23%; Precision = 80.24%; F1 score = 35.88%; Class normal: Recall = 69.53%; Specificity = 86.05%; Error Rate = 6.22%; Precision = 96.15%; F1 score = 80.82%; Class NOISE: Recall = 30.12%; Specificity = 92.74%; Error Rate = 5.80%; Precision = 82.32%; F1 score = 45.28%; Class VT: Recall = 51.19%; Specificity = 95.52%; Error Rate = 2.43%; Precision = 80.41%; F1 score = 62.08%; Class VF: Recall = 6.68%; Specificity = 77.42%; Error Rate = 21.79%; Precision = 79.51%; F1 score = 12.31%; Class AFIB: Recall = 31.75%; Specificity = 93.95%; Error Rate = 5.76%; Precision = 98.20%; F1 score = 47.74%.
Figure 6. Results for various classifiers in the 6 classes (normal, VF, VFL, VT, Noise, AFIB) and the confusion matrix for classification in 6 classes with SVM (with global parameters Recall: 27.89%; Specificity: 86.88%; Error Rate: 72.11%; Precision: 83.14%; F1 Score: 41.53%). Class VFL: Recall = 23.04%; Specificity = 93.66%; Error Rate = 6.23%; Precision = 80.24%; F1 score = 35.88%; Class normal: Recall = 69.53%; Specificity = 86.05%; Error Rate = 6.22%; Precision = 96.15%; F1 score = 80.82%; Class NOISE: Recall = 30.12%; Specificity = 92.74%; Error Rate = 5.80%; Precision = 82.32%; F1 score = 45.28%; Class VT: Recall = 51.19%; Specificity = 95.52%; Error Rate = 2.43%; Precision = 80.41%; F1 score = 62.08%; Class VF: Recall = 6.68%; Specificity = 77.42%; Error Rate = 21.79%; Precision = 79.51%; F1 score = 12.31%; Class AFIB: Recall = 31.75%; Specificity = 93.95%; Error Rate = 5.76%; Precision = 98.20%; F1 score = 47.74%.
Applsci 14 03050 g006
Figure 7. Results for various classifiers in the 13 classes and the confusion matrix for classification in 13 classes with SVM (Recall global = 37.93%; Specificity global = 98.77%; Error Rate global = 21.33%; Precision global = 82.88%; F1 Score global = 52.25%).
Figure 7. Results for various classifiers in the 13 classes and the confusion matrix for classification in 13 classes with SVM (Recall global = 37.93%; Specificity global = 98.77%; Error Rate global = 21.33%; Precision global = 82.88%; F1 Score global = 52.25%).
Applsci 14 03050 g007
Figure 8. Results for various classifiers from MATLAB® environment in the 2 classes and confusion matrix for 2-class classification (VF vs. another class) for classification 40 min in advance of the time of FV installation.
Figure 8. Results for various classifiers from MATLAB® environment in the 2 classes and confusion matrix for 2-class classification (VF vs. another class) for classification 40 min in advance of the time of FV installation.
Applsci 14 03050 g008
Figure 9. Classification outcomes for different classifiers. Forecast with 50 min before the onset of VF events for training and testing with data only from SCDH database.
Figure 9. Classification outcomes for different classifiers. Forecast with 50 min before the onset of VF events for training and testing with data only from SCDH database.
Applsci 14 03050 g009
Table 1. Division of ECG segments into 15 classes.
Table 1. Division of ECG segments into 15 classes.
No. ClassNo. Examples
AFIB: atrial fibrillation14993
ASYS: asystole 130
B: ventricular bigeminy12152
BI: first degree heart block111322
HGEA: high grade ventricular ectopic activity10282
N or NSR: nonrmal sinus rhythm15124
NOD: nodal (“AV junctional”) rhythm90
NOISE: noise21122
PM: pacemaker (paced rhythm)8408
SBR: sinus bradycardia78
SVTA: supraventricular tachyarrhythmia6426
VER: ventricular escape rhythm514
VF or VFIB: ventricular fibrillation4712
VFL: ventricular flutter0825
VT: ventricular tachycardia3980
Table 2. Classification outcomes for division into various categories.
Table 2. Classification outcomes for division into various categories.
No. ClassesMethodClassification Rate
ventricular fibrillation (VF) vs. remainder
294.6%Ensemble of classifiers
291.8%MLP
294.2%SVM
normal, VF, VFL, VT, Noise
589.9%Ensemble of classifiers
585.4%MLP
585.6%SVM
normal, VF, VFL, VT, Noise, AFIB
689.9%Ensemble of classifiers
685.4%MLP
690.4%SVM
All classes
1589.5%Ensemble of classifiers
1586.4%MLP
1589.2%SVM
Aggregated ranks
AggRanks_weighted meanAggRanks_mean
Ensemble0.03770.4167
MLP0.10271
SVM0.07280.5833
Table 3. Classification results obtained with several cross-validation methods or holdout validations for cubic SVM and all classes.
Table 3. Classification results obtained with several cross-validation methods or holdout validations for cubic SVM and all classes.
5-Fold Cross-Validation10-Fold Cross-Validation20% Held Out30% Held Out40% Held Out50% Held Out
89.8%90.1%90.2%90.2%88.8%88.8%
Table 4. Results of the prediction of VF episodes for different moments in time (with 20, 30, 40 and 50 min before VF event for training and testing with data from NSR and SCDH databases). Green background indicates correct classification.
Table 4. Results of the prediction of VF episodes for different moments in time (with 20, 30, 40 and 50 min before VF event for training and testing with data from NSR and SCDH databases). Green background indicates correct classification.
20 min before VF
Predicted class (Ensemble of classifiers 99.7%)
Recall = 99.72%; Specificity = 99.67; Error Rate = 0.26%; Precision = 99.63%; F1 score = 99.56%
Predicted class
NormalVF
True classNormal10764
VF21196
30 min before VF
Predicted class (Ensemble of classifiers 98.9%)
Recall = 99.62%; Specificity = 98.36%; Error Rate = 1.05%; Precision = 98.15%; F1 score = 98.89%
Predicted class
NormalVF
True classNormal106020
VF41196
40 min before VF
Predicted class (Ensemble of classifiers 99.9%)
Recall = 100%; Specificity = 99.75%; Error Rate = 0.13%; Precision = 99.72%; F1 score = 99.72%
Predicted class
NormalVF
True classNormal10773
VF01200
50 min before VF
Predicted class (Ensemble of classifiers 99.6%)
Recall = 99.81%; Specificity = 99.42%; Error Rate = 0.39%; Precision = 99.35%; F1 score = 99.58%
Predicted class
NormalVF
True classNormal10737
VF21198
Table 5. The confusion matrices for classifications, respectively, with 40 and 50 min before VF event for training and testing with data from NSR and SCDH databases. Green background indicates correct classification.
Table 5. The confusion matrices for classifications, respectively, with 40 and 50 min before VF event for training and testing with data from NSR and SCDH databases. Green background indicates correct classification.
40 min before VF
Predicted class (MLP = 95.3%)
Recall = 94.29%; Specificity = 96.39%; Error Rate = 4.68%; Precision = 95.91%; F1 score = 95.28%
NSR and SCDHPredicted class
NormalVF
True classNormal30513
VF19347
50 min before VF
Predicted class (MLP = 96.1%)
Recall = 92.28%; Specificity = 99.44%; Error Rate = 3.95%; Precision = 99.34%; F1 score = 95.55%
NSR and SCDHPredicted class
NormalVF
True classNormal2992
VF25358
Table 6. The results of the prediction of VF episodes for different moments in time (with 30, 40 and 50 min before VF event for training and testing with only SCDH data). Green background indicates correct classification.
Table 6. The results of the prediction of VF episodes for different moments in time (with 30, 40 and 50 min before VF event for training and testing with only SCDH data). Green background indicates correct classification.
30 min before VF
Predicted class (Ensemble of classifiers 86.7%)
Recall = 86.94%; Specificity = 86.32%; Error Rate = 13.32%; Precision = 83.53%; F1 score = 85.07%
Only SCDHPredicted class
NormalVF
True classNormal852168
VF1271073
40 min before VF
Predicted class (Ensemble of classifiers 88.3%)
Recall = 88.08%; Specificity = 88.41%%; Error Rate = 11.71%; Precision = 86.18%; F1 score = 87.06%
Only SCDHPredicted class
NormalVF
True classNormal879141
VF1191081
50 min before VF
Predicted class (Ensemble of classifiers 90.3%)
Recall = 90.52%; Specificity = 90.13%%; Error Rate = 9.73%; Precision = 88.04%; F1 score = 89.16%
Only SCDHPredicted class
NormalVF
True classNormal898122
VF941106
Table 7. Results with MLP for classifications with 50 min before the onset of VF and 50 min after the end of VF for forecast (i.e., only data from SCDH database).
Table 7. Results with MLP for classifications with 50 min before the onset of VF and 50 min after the end of VF for forecast (i.e., only data from SCDH database).
MLP ConfigurationsLearning RateClassification Rate
MLP with hypermathematical optimization technique
26–25–10.0038286.3%
26–33–1 0.0011587.3%
26–30–1 0.9981587.1%
MLP without hypermathematical optimization technique
25–10–1default87.3%
Table 8. Assessment of VF identification methods for analogy with our results (with gray background).
Table 8. Assessment of VF identification methods for analogy with our results (with gray background).
The MethodSens % Spec %Acc %Database
DETECTION of VF in this paper
with MLP in 3 s 91.8%VFDB MIT-BIH
with ensemble of classifiers 94.6%VFDB MIT-BIH
With SVM 94.2%VFDB MIT-BIH
PREDICTION of VF in this paper
with MLP—20 min in advance 99.7%NSR & SCDH MIT-BIH
with MLP—30 min in advance 98.9%NSR & SCDH MIT-BIH
with MLP—40 min in advance 99.9%NSR & SCDH MIT-BIH
with MLP—50 min in advance 99.6%NSR & SCDH MIT-BIH
with MLP—40 min in advance 95.3%NSR & SCDH MIT-BIH
with MLP—50 min in advance 96.1%NSR & SCDH MIT-BIH
with ensemble of classifiers—30 min in advance 86.7%SCDH MIT-BIH
with ensemble of classifiers—40 min in advance 88.3%SCDH MIT-BIH
with ensemble of classifiers—50 min in advance 90.3%SCDH MIT-BIH
with MLP with hiperparameters optimization 87.3%SCDH MIT-BIH
using Boltzmann [1]92.52 MIT-BIH
using Discriminant Analysis [2]94.1093.80 AHA & MIT-BIH
using Filter and Counts [3]94.4095.9094.70AHA & MIT-BIH
using Approximate Entropy [5]91.8490.2091.00MIT-BIH
using EMD & App Entropy [6]90.4791.6691.20MIT-BIH
using KNN [7]98.1088.0093.20MIT-BIH
using RBF [7]91.5390.9191.30MIT-BIH
using Fuzzy [8] 90.90MIT-BIH
using TSK Fuzzy [9] 93.30MIT-BIH
using Mamdani Fuzzy [9] 86.60MIT-BIH
using Random Forest Classifier [12]95.0494.7894.79CU & MIT-BIH
using SVM [13]95.0099.00 CU & MIT-BIH
using Binary Decision Tree [14]95.3094.5094.20CU & MIT-BIH
using SVM [14]90.4091.6089.30CU & MIT-BIH
using LS-SVM with RBF kernels [15]85.2082.4683.75CU & MIT-BIH
using Lempel-Ziv and EMD [19] 98.1596.0197.10CU & MIT-BIH
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fira, M.; Costin, H.-N.; Goras, L. Prediction and Detection of Ventricular Fibrillation Using Complex Features and AI-Based Classification. Appl. Sci. 2024, 14, 3050. https://doi.org/10.3390/app14073050

AMA Style

Fira M, Costin H-N, Goras L. Prediction and Detection of Ventricular Fibrillation Using Complex Features and AI-Based Classification. Applied Sciences. 2024; 14(7):3050. https://doi.org/10.3390/app14073050

Chicago/Turabian Style

Fira, Monica, Hariton-Nicolae Costin, and Liviu Goras. 2024. "Prediction and Detection of Ventricular Fibrillation Using Complex Features and AI-Based Classification" Applied Sciences 14, no. 7: 3050. https://doi.org/10.3390/app14073050

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop