Next Article in Journal
Augmented Data-Driven Approach towards 3D Printed Concrete Mix Prediction
Previous Article in Journal
Effects of Five Different Toothpastes on Remineralization and Surface Roughness of Primary Tooth Enamel with Artificial Initial Caries
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Arrhythmias Using Heart Rate Signals from Smartwatches

by
Herwin Alayn Huillcen Baca
1,*,
Agueda Muñoz Del Carpio Toia
2,
José Alfredo Sulla Torres
2,
Roderick Cusirramos Montesinos
3,
Lucia Alejandra Contreras Salas
4 and
Sandra Catalina Correa Herrera
5
1
Academic Department of Engineering and Information Technology, Professional School of Systems Engineering, Faculty of Engineering, Jose Maria Arguedas National University, Andahuaylas 03701, Peru
2
Vicerrectorado de Investigación, Universidad Católica de Santa María, Arequipa 04013, Peru
3
Agile Corporation, Arequipa 04013, Peru
4
Professional School of Systems Engineering, San Agustín of Arequipa National University, Arequipa 04013, Peru
5
Armonía Research Group, Hanami Psychosocial Care and Research Center, Bogotá 11001, Colombia
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(16), 7233; https://doi.org/10.3390/app14167233
Submission received: 29 June 2024 / Revised: 14 August 2024 / Accepted: 15 August 2024 / Published: 16 August 2024
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

:
According to the World Health Organization (WHO), cardiovascular illnesses, including arrhythmia, are the primary cause of mortality globally, responsible for over 31% of all fatalities each year. To reduce mortality, early and precise diagnosis is essential. Although the analysis of electrocardiograms (ECGs) is the primary means of detecting arrhythmias, it depends significantly on the expertise and subjectivity of the health professional reading and interpreting the ECG, and errors may occur in detection. Artificial intelligence provides tools, techniques, and models that can support health professionals in detecting arrhythmias. However, these tools are based only on ECG data, of which the process of obtaining is an invasive, high-cost method requiring specialized equipment and personnel. Smartwatches feature sensors that can record real-time signals indicating the heart’s behavior, such as ECG signals and heart rate. Using this approach, we propose a machine learning- and deep learning-based approach for detecting arrhythmias using heart rate data obtained with smartwatches. Heart rate data were collected from 252 patients with and without arrhythmias who attended a clinic in Arequipa, Peru. Heart rates were also collected from 25 patients who wore smartwatches. Ten machine learning algorithms were implemented to generate the most effective arrhythmia recognition model, with the decision tree algorithm being the most suitable. The results were analyzed using accuracy, sensitivity, and specificity metrics. Using Holter data yielded values of 93.2%, 91.89%, and 94.59%, respectively. Using smartwatch data yielded values of 70.83%, 91.67%, and 50%, respectively. These results indicate that our model can effectively recognize arrhythmias from heart rate data. The high sensitivity score suggests that our model adequately recognizes true positives; that is, patients with arrhythmia. Likewise, its specificity suggests an adequate recognition of false positives.

1. Introduction

With 17.9 million deaths annually, cardiovascular diseases (CVDs) are a class of heart and blood vessel issues that are the primary causes of death globally [1]. A class of CVD known as cardiac arrhythmia encompasses a number of disorders characterized by erratic, rapid, or slow heartbeats. While atrial fibrillation (AF) is the most prevalent arrhythmia, patients may also have symptoms from other cardiac arrhythmias [2].
In order to save lives and provide appropriate treatment, early and precise diagnosis is essential. This procedure can be difficult, however, as a lot of symptoms are unclear and call for the knowledge of qualified medical professionals. This is especially problematic in developing nations where there is a scarcity of medical personnel, making it challenging for patients to receive proper diagnostic procedures. Additionally, low-income people may not be able to afford the costly medical testing needed for diagnosis [3,4,5].
Although electrocardiograms (ECGs) play the most important role in detecting and classifying arrhythmias, ECG analysis poses several challenges. Traditional electrocardiographic analysis is often laborious and dependent on the doctor’s experience, which can lead to errors in interpretation [6]. Additionally, irregular or transitory arrhythmias might not be recorded by ECG equipment if they do not happen during recording. Moreover, the placement of the required physical contact sites (electrodes) may have an impact on the recording accuracy. Finally, ECG signals are susceptible to noise and artifacts. Consequently, doctors should be provided with tools to support the detection of arrhythmias [7].
Over the past decade, research on arrhythmia detection using photoplethysmograph (PPG) signals has increased [8].
Artificial intelligence comprises two main types of approach for automatic detection and recognition: machine learning and deep learning. Some machine learning methods include the support vector machine (SVM) [9,10,11,12], random forest (RF) [11,13,14], and decision tree (DT) [11,15] algorithms, while deep learning approaches include models based on the artificial neural network (ANN) [11,16,17,18] and Transformer [19,20] architectures. The inherent capabilities of such methods have been leveraged to process information from ECG time-series for the improved detection and accurate classification of arrhythmias [7]. The detection and classification of arrhythmias have advanced significantly due to the ease of access to systems with higher processing capacity and the development of machine learning techniques [21]. However, most works aim to improve the accuracy of models based on known data sets, without assessing their real-world applicability [22,23,24,25,26,27,28].
Fortunately, technological advances have led to the widespread availability of wearable smart devices, such as smartwatches, which are capable of detecting cardiac arrhythmias and various health conditions [29,30]. Smartwatches can monitor biometric data, including oxygen saturation, sleep patterns, blood pressure, and heart rate [31]. Smartwatches can be useful in detecting ECG abnormalities such as bradyarrhythmias, tachyarrhythmias, or variations suggestive of ischemia, in addition to biometric data detection [32]. As of right now, smartwatches can help medical practitioners to identify and treat a wide range of disorders related to electrocardiograms (ECGs) [29]. However, irregularities and mistakes in the data can lead to insufficient detection in the case of the extracted ECGs.
Taking the above information into account, we propose an alternative to traditional arrhythmia detection techniques using Holter monitors. Our proposal is based on the use of smartwatches, which are non-invasive, comfortable, and low-cost devices. Their use will allow anyone—with or without arrhythmia—to obtain information about a possible arrhythmia, subsequently receive a diagnosis from a cardiologist, and undergo appropriate treatment. This is important as early diagnoses could save lives.
Our arrhythmia detection model is based on artificial intelligence. Although many good detection proposals have used artificial intelligence, their techniques are typically based on ECG data derived from Holter monitors. In contrast, the proposed model uses heart rate data. To the best of our knowledge, no work has carried out the detection of arrhythmias based on the heart rate. Therefore, we do not use classic data sets, such as MIT BIH arrhythmia [33]. Instead, we propose two data sets derived from patients with and without arrhythmia presenting certain characteristics based on their heart rate, including one data set for training and testing the model and another data set for validation.
The data used in the model include subjects’ age, sex, and the minimum, maximum, and average heart rates over a 24-h period of using the device. These data provide a great advantage as they are tabular and do not require the use of a heavy model based on a specialized architecture such as Transformer. Therefore, the model uses lightweight machine learning algorithms that can be deployed on a smartphone or smartwatch.
Our model, which was designed to be deployed on wearable devices, offers a practical and accessible solution for early detection of arrhythmia. This tool eliminates the need for electrocardiograms, making it a convenient and non-invasive option for patients.
The model was trained using heart rate recordings extracted from Holter devices worn by 252 patients at a clinic in Arequipa, Peru. Finally, it was validated with 25 records extracted from smartwatches worn by patients with and without arrhythmia.

2. Related Works

2.1. Arrhythmia Detection Using Artificial Intelligence

Recent proposals aimed at detecting arrhythmias using machine learning or deep learning approaches have typically taken the MIT BIH arrhythmia data set [33] as a reference data set to train and validate their models. The results are measured based on the accuracy metric, and the difference between the proposals is associated with the developed models. Therefore, the technique used is crucial in the arrhythmia detection process.
Using models with multi-layer structures, these approaches also use the ECG as an input signal. Each layer can be thought of as a feature extractor that can learn how to get the best signal features [34]. The categorization models examined in the chosen research can be broadly categorized into the following types: Transformers, convolutional neural networks (CNNs), recurrent neural networks (RNNs), long short-term memory (LSTM) models, and hybrid approaches, which denote combinations of these various models. Table 1 lists the most significant and recent works in detail.
Although these proposed methods have achieved good results in terms of accuracy, none are oriented toward real applications, as their objective is to achieve the best results in a known data set while lacking validation in ECG data obtained from patients who were not part of the training data set collection process.

2.2. Arrhythmia Detection Using Artificial Intelligence and Smartwatches

Smartwatches provide greater access to user data that may help in preventing and treating medical conditions. The evolution of watches in recent years has taken them from being timepiece accessories to computers that enable real-time signal recording, including ECGs [37]. With PPG, smartwatches can assess a patient’s cardiac rhythms in about 30 s. Extensive application-based research employing the PPG technique has demonstrated its critical significance in arrhythmia detection [38]. Although smartwatches have been widely used to detect arrhythmias, these devices can detect other cardiac abnormalities based on other recordings, such as heart rate.
Our work studies the most significant proposals for detecting arrhythmias using smartwatches. Although the techniques used are similar to those described in the previous section, data extracted from smartwatches are used in the training and validation data sets. Three review works are taken as references [2,39,40].
A total of 256 patients were investigated by Caillol et al. [32]. The standard 12-lead ECG was recorded first, and then the ECG from the smartwatch was recorded. All 40 cases of bradyarrhythmia and all 64 cases of tachyarrhythmia were detected based on the data from the smartwatch. Nonetheless, the sensitivity and specificity of arrhythmia diagnosis remained poor, at 25% and 99%, respectively.
After performing a normal 12-lead ECG, Ploux et al. [41] assessed 260 individuals whose ECG was captured using a smartwatch. In 57 out of 62 patients (92%), atrial arrhythmia was accurately diagnosed by their proposal. The diagnostic accuracy displayed a sensitivity of 25% and a specificity of 99%.
Leroux et al. [42] assessed the Apple Watch’s sensitivity and specificity in 110 children with 12-lead ECGs that were either normal (n = 75) or aberrant (n = 35) and ranged in age from one week to sixteen years. When it came to identifying aberrant ECGs, the smartwatch tracings had a sensitivity and specificity of 84% and 100%, respectively.
The diagnostic capacity of commercially available smartwatches to detect atrial fibrillation (AF) was compared by Abu-Alrub et al. [43]. One hundred patients with a sinus rhythm and one hundred with AF were included in their study. They discovered that the sensitivity and specificity values of the Apple Watch Series 5 were 87% and 86%, respectively.
Using a Samsung Simband 2 (Samsung, Suwon, Republic of Korea), Han et al. [14] created an algorithm to identify atrial fibrillation. Thirty-five people participated in their study. Subjects with atrial fibrillation were identified with a sensitivity, specificity, and accuracy of 92.10%, 96.40%, and 95.10%, respectively.
The accuracy of the Apple Watch ECG in identifying atrial fibrillation (AF) was assessed by Racine et al. [44] in a sample of 734 patients, of whom 21% had AF diagnoses and varied ECG abnormalities. The analysis’s sensitivity was 88% and specificity was 98% when unclassified ECGs were removed.
In comparison to a 12-lead ECG, Rajakariar et al. [45] assessed the diagnostic accuracy of atrial fibrillation (AF) using an Apple Watch (Apple, Cupertino, CA, USA) equipped with an AliveCor KardiaBand (KB). The KB offered an automated diagnosis of a sinus rhythm or AF with a sensitivity and specificity of 81.9% and 94.4%, respectively, when paired with a smartwatch.
Table 2 summarizes these proposals. Although each proposal’s accuracy, sensitivity, and specificity results are shown, they cannot be strictly compared, as each proposal used its own data set, different types of smartwatches, and detected various types of arrhythmias. Our work takes these results into account as a reference, for the sake of comparison with our results.
It was also observed that all of these proposals used ECG data obtained from smartwatches as the input data for the detection of arrhythmias. To the best of our knowledge, no state-of-the-art proposal has used heart rate data for detecting arrhythmias; as such, this is a key challenge and contribution of our work.

3. Materials and Methods

3.1. Arrhythmia Data Set Collection

For our work, two data sets were collected: one for training and testing the model (the “arrhythmia data set”) and another for model validation (the “validation data set”) Both data sets were implemented based on solid clinical work for patient differentiation and obtaining statistics.
For the “arrhythmia data set”, the cardiologist on our team was in charge of enrolling 252 patients over 20 years of age, including 184 patients with a normal diagnosis and 68 with arrhythmia. Then, three-channel Holter ECG monitors (model TLC9803, CONTEC, Melbourne, FL, USA) were installed on the patients for 24 h and typical reports were extracted. Initially, the data were tabulated in a spreadsheet with 24 characteristics, including the expanded diagnosis and the final diagnosis, patient data, heart rate, variability, and type of arrhythmia. The data set was generated from these data, extracting only characteristics that can be obtained using a smartwatch.
In the case of the “validation data set”, the cardiologist and our research team enrolled 25 patients, including 12 patients with a normal diagnosis and 13 patients with previously diagnosed arrhythmia (labeled). The smartwatches, which were Samsung Galaxy Watch 4 models, were installed for 20 h and the heart rates of each patient were extracted. These data were tabulated in the spreadsheet, and the statistics of each patient were calculated, including the minimum, maximum, and average heart rates.
Both data sets are available via GitHub at https://github.com/hhuillcen/HRArrhythmiaDetection (accessed 20 June 2024), and they contain the following characteristics:
1.
Age;
2.
Sex;
3.
Minimum heart rate;
4.
Maximum heart rate;
5.
Average heart rate;
6.
Diagnosis.
These features are the only ones that can be extracted in a scenario in which a patient wears a smartwatch. The user knows their age and sex, and the smartwatch provides heart rates continuously for 20 h in 1-s intervals. It is challenging to conduct adequate arrhythmia detection with only these features.
The reason for extracting data from smartwatches for only 20 h was a technical issue. Smartwatches operating in standard mode consume more power; mainly when their sensor use increases and when patients use them for other purposes. Therefore, according to our study, the appropriate time to carry out tests to guarantee correct data capture and downloading was defined as 20 h given that, when tests were conducted over 24 h, not all watches had the power to support the entire capture and download process.
To extract heart rate data from the smartwatches, an application called “MiCardio” was constructed, which was developed in the Android environment using the Java programming language and uses the heart rate sensors provided in Samsung Galaxy 4 smartwatches (Samsung, Suwon, Republic of Korea). After capturing data for 20 h, the data were stored in the cloud and subsequently extracted in CSV format. The recommendations of the proposed general structure of healthcare applications for smartwatches on Wear OS were followed [46].
The capture process begins with installing “MiCardio” on the smartwatch. When the application is started, a welcome screen and a menu showing the type of data that can be captured are displayed. Finally, the capture start button is displayed (see Figure 1).

3.2. Model Generation Pipeline

The following steps were used to generate the classification models (see Figure 2):
1.
The arrhythmia data set was obtained (in CSV format) for pre-processing before the models were trained and tested.
(a)
The class characteristic “dxholterfinal” was normalized: 0 for ARRHYTHMIA and 1 for NORMAL.
(b)
Subsequently, imputation of missing values was conducted using the average technique.
(c)
In the previous subsection, it was clarified that there were 184 NORMAL records and 68 ARRHYTHMIA records; therefore, the data were balanced using the SMOTE algorithm to obtain 184 records for each case.
(d)
Age and the minimum, maximum, and average heart rates were normalized on a scale from 0 to 1, as they have different scales. This can cause certain features to dominate others, negatively impacting model performance.
2.
After pre-processing, the models were trained and tested.
(a)
The data set was divided as follows: 80% for training and 20% for testing.
(b)
Machine learning and deep learning algorithms and architectures were implemented for training and testing, and parameter optimization was carried out using grid search algorithms. The python GridSearchCV function was used, with the following parameters: estimator=log_reg, param_grid=param_grid, cv=StratifiedKFold(n_splits=5), verbose=2, n_jobs=-1, scoring=’f1’.
Subsequently, accuracy, sensitivity, and specificity metrics were calculated for each model.
3.
Heart rate samples were taken from the patients’ smartwatches and tested with the chosen model and algorithm to validate our proposal. Finally, the maximum, minimum, and average heart rates corresponding to 20 h of uninterrupted use were extracted. Data on the age and sex of each patient were also tabulated. Our model’s input data included the patient’s age and sex, as these variables are correlated with the detection of arrhythmia; in particular, older individuals have a greater probability of arrhythmia, and females are more at risk of cardiovascular diseases.
4.
The samples were used as input data into the model, displayed on a terminal such as a smartphone or a computer. The model provided a classification result of ARRHYTHMIA or NORMAL.

3.3. Model Configuration

The data set comprised tabular data; therefore, machine learning and deep learning algorithms were chosen for training and testing on the data. We refer to studies on commonly used machine learning algorithms and deep learning techniques [47,48] to provide descriptions of the algorithms used in the experiments:
1.
A multi-layer perceptron (MLP) is a kind of artificial neural network made up of an input layer, one or more hidden layers, and an output layer, among other layers. A completely linked network is formed when every neuron in one layer is coupled to every other layer’s neurons. Because MLPs can learn intricate, non-linear correlations from data, they are useful for a wide range of tasks, including natural language processing and picture identification. The sole deep learning algorithm that we employed in our research was an MLP.
2.
A support vector machine (SVM) is an effective classifier that divides data into two classes by determining the ideal hyperplane. The best hyperplane optimizes the margin—also referred to as support vectors—between the closest data points belonging to distinct classes. With the addition of kernel functions, support vector machines (SVMs) can be expanded to handle non-linear classification tasks. SVMs are especially efficient in high-dimensional fields.
3.
Logistic regression is a statistical technique applied to situations involving binary categorization. It uses a logistic function to represent the likelihood that a sample will belong to a specific class; the logistic function returns a number between 0 and 1. Logistic regression is a popular technique for managing huge data sets with a clear decision boundary because it is easy to interpret and efficient, despite its simplicity.
4.
A decision tree is a non-parametric supervised learning technique applied to regression and classification. A tree-like decision model is produced by segmenting the data into subsets according to the most important feature. Decision trees can be prone to over-fitting even if they are simple to understand and display, particularly when dealing with noisy data.
5.
A random forest is a technique for group learning that builds several decision trees during training and produces a class that is the average of the classes produced by the individual trees. By averaging the predictions, this improves accuracy and decreases over-fitting. Because of their great adaptability, random forests may be applied to tasks involving both regression and classification.
6.
Using gradient boosting, models are constructed one after the other, with each new model aiming to fix the flaws in its predecessor. Because it concentrates on lowering the model’s loss function, it is very successful for predictive modeling jobs. Popular versions include LightGBM, which is memory- and speed-optimized; CatBoost, which natively handles categorical features; and XGBoost, which is renowned for its accuracy and efficiency.
7.
Extreme gradient boosting (XGB) is an effective and scalable use of gradient boosting. It is an excellent option for structured or tabular data since it incorporates a number of optimizations, including regularization strategies, sparsity awareness, and parallelized tree construction.
8.
Light gradient boosting machine (LGBM) is an additional gradient boosting framework with a very low-memory- and computational-cost design. It grows trees in a leaf-wise manner, which may lead to deeper trees and possibly higher accuracy. LGBM is renowned for its quick training speed and is especially helpful when handling huge data sets.
9.
CatBoost is a gradient boosting approach that does not require explicit pre-processing, like one-hot encoding, to handle categorical information. It is useful for many real-world applications because it reduces over-fitting and enhances model generalization through the use of a unique method known as ordered boosting.
10.
A straightforward instance-based learning approach for regression and classification is the kNN algorithm. A sample is classified according to the majority vote of its neighbors, and among its k nearest neighbors, it is assigned to the most common class. Due to the need to store the complete training set, kNN can be computationally expensive, even in small data sets.
All algorithms were implemented on the Google Colaboratory platform, with Python version 3.10.12 and using typical libraries such as Torch, Pandas, Numpy, and SkLearn.
The optimization of parameters depended on the type of algorithm, as each one has different indicators. Table 3 shows the optimal parameters used with each algorithm.
The parameters used in machine learning algorithms are well known. Only the deep learning algorithm, multi-layer perceptron (MLP), uses hidden layers. In our case, this was defined by the parameter hidden_layer_sizes(150,150), which refers to the use of two hidden layers, each with 150 neurons.

4. Results and Discussion

4.1. Algorithm Training and Testing Results

After defining the models and algorithms, all of the algorithms were trained and tested, and their accuracy, sensitivity, and specificity values were calculated. Table 4 provides the obtained results.
Our work aims to detect arrhythmias, a clinical issue. Therefore, sensitivity is the most important metric, followed by specificity and accuracy.
Regarding sensitivity, the decision tree algorithm produced the best result (at 91.89%), followed by the kNN algorithm (at 90.54%). Regarding specificity, the kNN, XGB, and LGBM algorithms obtained the best results (at 97.3%), followed by the decision tree and gradient boosting methods (which achieved 94.59%). Therefore, the decision tree was deemed to be the best algorithm for detecting arrhythmias in our case.
Regarding accuracy, the decision tree algorithm once again took the lead, with an impressive 93.24%. This solidified our choice of using the decision tree as the classification model in our algorithm. Thus, we used the model generated with the decision tree for arrhythmia detection.

4.2. Comparison with State-of-the-Art Methods

We took the state-of-the-art works mentioned in the Section 2 as references. Our results are based on the model generated using the decision tree algorithm. A sample comparison is shown in Table 5. It is necessary to clarify that this comparison is not rigid, as all of these studies presented results from models trained and tested on electrocardiogram data captured using smartwatches, while our proposal used Holter heart rate data.
Our work stands out as the sole method that utilized sampled heart rate data, while all other proposals relied on electrocardiogram data. This unique approach, utilizing heart rate monitoring data obtained from smartwatches, not only offers automatic, comfortable, and less invasive monitoring for patients, but also lowers the algorithmic complexity and computational costs associated with arrhythmia detection. The lightweight nature of our model makes it ideal for deployment on mobile devices and smartwatches, further enhancing its appeal.
Our proposal boasted a high sensitivity rate of 91.89%, a figure that was only surpassed by the methods of Rajakariar et al. [45] and Han et al. [14] (at 94.4% and 92%, respectively). It is important to note that both these proposals utilized ECG samples from smartwatches, while our approach was based on heart rate monitoring. The first proposal detects atrial fibrillation using its data combined with those obtained using other KardiaBand devices, while the second also detects atrial fibrillation and only considers samples from 35 patients.
Our sensitivity result suggests that our model is good at detecting patients with arrhythmia; that is, it can correctly detect true positives. Sensitivity is the best metric for validating disease diagnostic tools in clinical settings.
Regarding specificity—that is, how well true negatives or normals are detected—our proposal reached 94.59%. Although some proposals achieved lower values, we must highlight that our data set was balanced; that is, there were as many records with arrhythmia as normal ones. This was not the case for the data sets used in the other studies, leading to bias in the specificity calculation.
Finally, when evaluating the model’s effectiveness, we found that its accuracy was 93.24%. This result suggests that our model is effective in recognizing arrhythmia from heart rate samples obtained from smartwatches.
The results of the implementation of the models with each algorithm, as well as their results, have been reported previously [49].

4.3. Model Validation Results with Patient Smartwatch Samples

We used the validation data set detailed in the Section 3 to validate our proposal with data obtained from smartwatches. The decision tree model was used, as it achieved the best results in terms of sensitivity and accuracy. The results of our proposed model applied to the sample validation data set are provided in Table 6.
Our model showed good sensitivity, with a value of 91.67%, almost the same as the results based on the training and testing data sets (91.89%); see Table 5. This result confirms that our model can effectively recognize arrhythmia from the smartwatch data of patients with arrhythmias; that is, in the true-positive case.
However, the specificity only reached 50%. This result indicates that our model is not good at recognizing the normality of patients; that is, it may be wrong when recognizing an arrhythmia in a patient who does not have it (i.e., false positives).
Finally, the overall accuracy was 70.83%, which is acceptable but low compared to that based on the training and testing data, due to errors in the recognition of false positives.
These results were also compared with those of the state-of-the-art methods (see Table 5). Regarding sensitivity, our proposal tested on heart rate data from smartwatches demonstrated cutting-edge results with respect to the other proposals (91.67%). Meanwhile, the accuracy and specificity results were the lowest when compared with those of the other proposals. Overall, this method using smartwatch data does not offer reliable results when detecting normality, but does offer reliable results when detecting the presence of an arrhythmia.

5. Conclusions

This study proposed a model for the detection of arrhythmias based on heart rate data obtained from smartwatches worn by patients with and without arrhythmias. To the best of our knowledge, this is the first proposal suggesting the recognition of arrhythmias based on heart rate data, as all previous state-of-the-art proposals have been constructed based on electrocardiogram data.
We collected two complete data sets: a set of test and training data for the detection model, containing the heart rate samples of 252 patients obtained using Holter equipment; and a validation data set including heart rate samples obtained from 25 patients wearing smartwatches.
Ten machine learning and deep learning algorithms were implemented to generate models for comparative testing, among which the decision tree model obtained the best results.
The training results of our model based on the Holter heart rate data demonstrated a sensitivity of 91.89%, an accuracy of 93.24%, and a specificity of 94.59%; thus, our model can effectively detect arrhythmias. These high sensitivity and specificity results provide peace of mind that patients—both with and without arrhythmia—are accurately recognized, underscoring the potential impact of our model in the healthcare context.
The proposed model was trained with accurate signals from Holters to test it with less accurate signals from smartwatches. Therefore, the test results of our model with heart rate data from smartwatches demonstrated a sensitivity of 91.67%, an accuracy of 70.83%, and a specificity of 50%. The model was not deployed on smartwatches. These results indicate that our model could be implemented in smartwatches to detect arrhythmias reliably; however, it is unreliable for detecting normality in patients.

Author Contributions

Conceptualization, H.A.H.B. and A.M.D.C.T.; methodology, H.A.H.B. and J.A.S.T.; software, H.A.H.B. and R.C.M.; validation, J.A.S.T., H.A.H.B. and A.M.D.C.T.; formal analysis, R.C.M.; investigation, H.A.H.B. and S.C.C.H.; resources, L.A.C.S.; data curation, J.A.S.T.; writing, H.A.H.B. and J.A.S.T.; writing—review and editing, H.A.H.B., S.C.C.H. and J.A.S.T.; visualization, R.C.M.; supervision, H.A.H.B.; project administration, A.M.D.C.T.; funding acquisition, A.M.D.C.T. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by PROCIENCIA—CONCYTEC, Peru, as part of the 2022 applied research projects competition, Contract number: PE501080050-2022-PROCIENCIA.

Institutional Review Board Statement

Approval code 042-2023, Research Ethics Committee of the Catholic University of Santa Maria Perú, 11 April 2023.

Informed Consent Statement

This work received the approval of the patients involved through informed consent.

Data Availability Statement

The data sets and models used in this work can be accessed through the following link: https://github.com/hhuillcen/HRArrhythmiaDetection.

Conflicts of Interest

Author Roderick Cusirramos Montesinos was employed by the company Agile Corporation. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Al’Aref, S.J.; Maliakal, G.; Singh, G.; van Rosendael, A.R.; Ma, X.; Xu, Z.; Alawamlh, O.A.H.; Lee, B.; Pandey, M.; Achenbach, S.; et al. Machine learning of clinical variables and coronary artery calcium scoring for the prediction of obstructive coronary artery disease on coronary computed tomography angiography: Analysis from the CONFIRM registry. Eur. Heart J. 2020, 41, 359–367. [Google Scholar] [CrossRef] [PubMed]
  2. Pay, L.; Yumurtaş, A.Ç.; Satti, D.I.; Hui, J.M.H.; Chan, J.S.K.; Mahalwar, G.; Lee, Y.H.A.; Tezen, O.; Birdal, O.; Inan, D.; et al. Arrhythmias beyond atrial fibrillation detection using smartwatches: A systematic review. Anatol. J. Cardiol. 2023, 27, 126. [Google Scholar] [CrossRef] [PubMed]
  3. Tiernay, L.; Papadakis, M.; Mcphee, S. Current Medical Diagnosis & Treatment; McGrawHill: New York, NY, USA, 2012. [Google Scholar]
  4. Ahsan, M.M.; Ahad, M.T.; Soma, F.A.; Paul, S.; Chowdhury, A.; Luna, S.A.; Yazdan, M.M.S.; Rahman, A.; Siddique, Z.; Huebner, P. Detecting SARS-CoV-2 from chest X-Ray using artificial intelligence. IEEE Access 2021, 9, 35501–35513. [Google Scholar] [CrossRef] [PubMed]
  5. Coon, E.R.; Quinonez, R.A.; Moyer, V.A.; Schroeder, A.R. Overdiagnosis: How our compulsion for diagnosis may be harming children. Pediatrics 2014, 134, 1013–1023. [Google Scholar] [CrossRef] [PubMed]
  6. Halford, J.J. Computerized epileptiform transient detection in the scalp electroencephalogram: Obstacles to progress and the example of computerized ECG interpretation. Clin. Neurophysiol. 2009, 120, 1909–1915. [Google Scholar] [CrossRef] [PubMed]
  7. Ansari, Y.; Mourad, O.; Qaraqe, K.; Serpedin, E. Deep learning for ECG Arrhythmia detection and classification: An overview of progress for period 2017–2023. Front. Physiol. 2023, 14, 1246746. [Google Scholar] [CrossRef] [PubMed]
  8. Neha; Sardana, H.; Kanwade, R.; Tewary, S. Arrhythmia detection and classification using ECG and PPG techniques: A review. Phys. Eng. Sci. Med. 2021, 44, 1027–1048. [Google Scholar] [CrossRef] [PubMed]
  9. Shan, S.M.; Tang, S.C.; Huang, P.W.; Lin, Y.M.; Huang, W.H.; Lai, D.M.; Wu, A.Y.A. Reliable PPG-based algorithm in atrial fibrillation detection. In Proceedings of the 2016 IEEE Biomedical Circuits and Systems Conference (BioCAS), Shanghai, China, 17–19 October 2016; pp. 340–343. [Google Scholar]
  10. Schäck, T.; Harb, Y.S.; Muma, M.; Zoubir, A.M. Computationally efficient algorithm for photoplethysmography-based atrial fibrillation detection using smartphones. In Proceedings of the 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jeju Island, Republic of Korea, 11–15 July 2017; pp. 104–108. [Google Scholar]
  11. Kanawade, R.; Tewary, S.; Sardana, H. Photoplethysmography based arrhythmia detection and classification. In Proceedings of the 2019 6th International Conference on Signal Processing and Integrated Networks (SPIN), Noida, India, 7–8 March 2019; pp. 944–948. [Google Scholar]
  12. Neha; Sardana, H.K.; Kanawade, R.; Dogra, N. Photoplethysmograph based arrhythmia detection using morphological features. Biomed. Signal Process. Control 2023, 81, 104422. [Google Scholar] [CrossRef]
  13. Eerikäinen, L.M.; Bonomi, A.G.; Schipper, F.; Dekker, L.R.; de Morree, H.M.; Vullings, R.; Aarts, R.M. Detecting atrial fibrillation and atrial flutter in daily life using photoplethysmography data. IEEE J. Biomed. Health Inform. 2019, 24, 1610–1618. [Google Scholar] [CrossRef] [PubMed]
  14. Han, D.; Bashar, S.K.; Zieneddin, F.; Ding, E.; Whitcomb, C.; McManus, D.D.; Chon, K.H. Digital image processing features of smartwatch photoplethysmography for cardiac arrhythmia detection. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 4071–4074. [Google Scholar]
  15. Fallet, S.; Lemay, M.; Renevey, P.; Leupi, C.; Pruvot, E.; Vesin, J.M. Can one detect atrial fibrillation using a wrist-type photoplethysmographic device? Med. Biol. Eng. Comput. 2019, 57, 477–487. [Google Scholar] [CrossRef] [PubMed]
  16. Solosenko, A.; Marozas, V. Automatic premature ventricular contraction detection in photoplethysmographic signals. In Proceedings of the 2014 IEEE Biomedical Circuits and Systems Conference (BioCAS) Proceedings, Lausanne, Switzerland, 22–24 October 2014; pp. 49–52. [Google Scholar]
  17. Sološenko, A.; Petrėnas, A.; Marozas, V. Photoplethysmography-based method for automatic detection of premature ventricular contractions. IEEE Trans. Biomed. Circuits Syst. 2015, 9, 662–669. [Google Scholar] [CrossRef] [PubMed]
  18. Neha.; Sardana, H.K.; Dogra, N.; Kanawade, R. Dynamic time warping based arrhythmia detection using photoplethysmography signals. Signal Image Video Process. 2022, 16, 1925–1933. [Google Scholar] [CrossRef]
  19. Wang, J.; Qiao, X.; Liu, C.; Wang, X.; Liu, Y.; Yao, L.; Zhang, H. Automated ECG classification using a non-local convolutional block attention module. Comput. Methods Programs Biomed. 2021, 203, 106006. [Google Scholar] [CrossRef] [PubMed]
  20. Ji, C.; Wang, L.; Qin, J.; Liu, L.; Han, Y.; Wang, Z. MSGformer: A multi-scale grid transformer network for 12-lead ECG arrhythmia detection. Biomed. Signal Process. Control 2024, 87, 105499. [Google Scholar] [CrossRef]
  21. Chu, M.; Wu, P.; Li, G.; Yang, W.; Gutiérrez-Chico, J.L.; Tu, S. Advances in diagnosis, therapy, and prognosis of coronary artery disease powered by deep learning algorithms. JACC Asia 2023, 3, 1–14. [Google Scholar] [CrossRef] [PubMed]
  22. Chen, C.; Hua, Z.; Zhang, R.; Liu, G.; Wen, W. Automated arrhythmia classification based on a combination network of CNN and LSTM. Biomed. Signal Process. Control 2020, 57, 101819. [Google Scholar] [CrossRef]
  23. Zhou, S.; Tan, B. Electrocardiogram soft computing using hybrid deep learning CNN-ELM. Appl. Soft Comput. 2020, 86, 105778. [Google Scholar] [CrossRef]
  24. Hammad, M.; Iliyasu, A.M.; Subasi, A.; Ho, E.S.; Abd El-Latif, A.A. A multitier deep learning model for arrhythmia detection. IEEE Trans. Instrum. Meas. 2020, 70, 1–9. [Google Scholar] [CrossRef]
  25. Kim, Y.K.; Lee, M.; Song, H.S.; Lee, S.W. Automatic cardiac arrhythmia classification using residual network combined with long short-term memory. IEEE Trans. Instrum. Meas. 2022, 71, 1–17. [Google Scholar] [CrossRef]
  26. Hammad, M.; Abd El-Latif, A.A.; Hussain, A.; Abd El-Samie, F.E.; Gupta, B.B.; Ugail, H.; Sedik, A. Deep learning models for arrhythmia detection in IoT healthcare applications. Comput. Electr. Eng. 2022, 100, 108011. [Google Scholar] [CrossRef]
  27. Islam, M.R.; Kabir, M.M.; Mridha, M.F.; Alfarhood, S.; Safran, M.; Che, D. Deep learning-based IoT system for remote monitoring and early detection of health issues in real-time. Sensors 2023, 23, 5204. [Google Scholar] [CrossRef]
  28. Mousavi, S.; Afghah, F. Inter-and intra-patient ecg heartbeat classification for arrhythmia detection: A sequence to sequence deep learning approach. In Proceedings of the ICASSP 2019–2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK, 12–17 May 2019; pp. 1308–1312. [Google Scholar]
  29. Garikapati, K.; Turnbull, S.; Bennett, R.G.; Campbell, T.G.; Kanawati, J.; Wong, M.S.; Thomas, S.P.; Chow, C.K.; Kumar, S. The role of contemporary wearable and handheld devices in the diagnosis and management of cardiac arrhythmias. Hear. Lung Circ. 2022, 31, 1432–1449. [Google Scholar] [CrossRef]
  30. Xiao-Yong, C.; Bo-Xiong, Y.; Shuai, Z.; Jie, D.; Peng, S.; Lin, G. Intelligent health management based on analysis of big data collected by wearable smart watch. Cogn. Robot. 2023, 3, 1–7. [Google Scholar] [CrossRef]
  31. Lima, F.V.; Kadiyala, V.; Huang, A.; Agusala, K.; Cho, D.; Freeman, A.M.; Druz, R. At the crossroads! Time to start taking smartwatches seriously. Am. J. Cardiol. 2022, 179, 96–101. [Google Scholar] [CrossRef]
  32. Caillol, T.; Strik, M.; Ramirez, F.D.; Abu-Alrub, S.; Marchand, H.; Buliard, S.; Welte, N.; Ploux, S.; Haïssaguerre, M.; Bordachar, P. Accuracy of a smartwatch-derived ECG for diagnosing bradyarrhythmias, tachyarrhythmias, and cardiac ischemia. Circ. Arrhythmia Electrophysiol. 2021, 14, e009260. [Google Scholar] [CrossRef]
  33. Moody, G.B.; Mark, R.G. The impact of the MIT-BIH arrhythmia database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef]
  34. Ganguly, B.; Ghosal, A.; Das, A.; Das, D.; Chatterjee, D.; Rakshit, D. Automated detection and classification of arrhythmia from ECG signals using feature-induced long short-term memory network. IEEE Sens. Lett. 2020, 4, 1–4. [Google Scholar] [CrossRef]
  35. 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]
  36. Akan, T.; Alp, S.; Bhuiyan, M.A.N. ECGformer: Leveraging transformer for ECG heartbeat arrhythmia classification. arXiv 2024, arXiv:2401.05434. [Google Scholar]
  37. Chau, K.Y.; Lam, M.H.S.; Cheung, M.L.; Tso, E.K.H.; Flint, S.W.; Broom, D.R.; Tse, G.; Lee, K.Y. Smart technology for healthcare: Exploring the antecedents of adoption intention of healthcare wearable technology. Health Psychol. Res. 2019, 7. [Google Scholar] [CrossRef]
  38. Turakhia, M.P.; Desai, M.; Hedlin, H.; Rajmane, A.; Talati, N.; Ferris, T.; Desai, S.; Nag, D.; Patel, M.; Kowey, P.; et al. Rationale and design of a large-scale, app-based study to identify cardiac arrhythmias using a smartwatch: The Apple Heart Study. Am. Heart J. 2019, 207, 66–75. [Google Scholar] [CrossRef] [PubMed]
  39. Bogár, B.; Pető, D.; Sipos, D.; Füredi, G.; Keszthelyi, A.; Betlehem, J.; Pandur, A.A. Detection of Arrhythmias Using Smartwatches—A Systematic Literature Review. Healthcare 2024, 12, 892. [Google Scholar] [CrossRef] [PubMed]
  40. Neri, L.; Oberdier, M.T.; van Abeelen, K.C.; Menghini, L.; Tumarkin, E.; Tripathi, H.; Jaipalli, S.; Orro, A.; Paolocci, N.; Gallelli, I.; et al. Electrocardiogram monitoring wearable devices and artificial-intelligence-enabled diagnostic capabilities: A review. Sensors 2023, 23, 4805. [Google Scholar] [CrossRef] [PubMed]
  41. Ploux, S.; Strik, M.; Caillol, T.; Ramirez, F.D.; Abu-Alrub, S.; Marchand, H.; Buliard, S.; Haissaguerre, M.; Bordachar, P. Beyond the wrist: Using a smartwatch electrocardiogram to detect electrocardiographic abnormalities. Arch. Cardiovasc. Dis. 2022, 115, 29–36. [Google Scholar] [CrossRef] [PubMed]
  42. Leroux, J.; Strik, M.; Ramirez, F.D.; Racine, H.P.; Ploux, S.; Sacristan, B.; Chabaneix-Thomas, J.; Jalal, Z.; Thambo, J.B.; Bordachar, P. Feasibility and diagnostic value of recording Smartwatch electrocardiograms in neonates and children. J. Pediatr. 2023, 253, 40–45. [Google Scholar] [CrossRef] [PubMed]
  43. Abu-Alrub, S.; Strik, M.; Ramirez, F.D.; Moussaoui, N.; Racine, H.P.; Marchand, H.; Buliard, S.; Haïssaguerre, M.; Ploux, S.; Bordachar, P. Smartwatch electrocardiograms for automated and manual diagnosis of atrial fibrillation: A comparative analysis of three models. Front. Cardiovasc. Med. 2022, 9, 836375. [Google Scholar] [CrossRef] [PubMed]
  44. Racine, H.P.; Strik, M.; van der Zande, J.; Alrub, S.A.; Caillol, T.; Haïssaguerre, M.; Ploux, S.; Bordachar, P. Role of coexisting ECG anomalies in the accuracy of smartwatch ECG detection of atrial fibrillation. Can. J. Cardiol. 2022, 38, 1709–1712. [Google Scholar] [CrossRef] [PubMed]
  45. Rajakariar, K.; Koshy, A.N.; Sajeev, J.K.; Nair, S.; Roberts, L.; Teh, A.W. Accuracy of a smartwatch based single-lead electrocardiogram device in detection of atrial fibrillation. Heart 2020, 106, 665–670. [Google Scholar] [CrossRef] [PubMed]
  46. Ramezani, R.; Cao, M.; Earthperson, A.; Naeim, A. Developing a smartwatch-based healthcare application: Notes to consider. Sensors 2023, 23, 6652. [Google Scholar] [CrossRef] [PubMed]
  47. Sarker, I.H. Machine learning: Algorithms, real-world applications and research directions. SN Comput. Sci. 2021, 2, 160. [Google Scholar] [CrossRef] [PubMed]
  48. Ray, S. A quick review of machine learning algorithms. In Proceedings of the 2019 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COMITCon), Faridabad, India, 14–16 February 2019; pp. 35–39. [Google Scholar]
  49. Huillcen, H. Detection of Arrhythmias Using Heart Rate Signals from Smartwatches—Implementation. 2024. Available online: https://zenodo.org/records/12817732 (accessed on 20 June 2024).
Figure 1. Graphical interfaces of the “MiCardio” smartwatch application.
Figure 1. Graphical interfaces of the “MiCardio” smartwatch application.
Applsci 14 07233 g001
Figure 2. Model generation pipeline.
Figure 2. Model generation pipeline.
Applsci 14 07233 g002
Table 1. Summary of the most recent proposals for detecting arrhythmias using artificial intelligence.
Table 1. Summary of the most recent proposals for detecting arrhythmias using artificial intelligence.
StudyYearTechniqueAccuracy
Acharya et al. [35]2017Deep CNN0.945
Chen et al. [22]2020CNN + LSTM0.992
Zhou and Tan. [23]2020CNN0.975
Hammad et al. [24]2020DNN + GA + KNN0.98
Kim et al. [25]2022ResNet + BiLSTM0.992
Hammad et al. [26]2023Semi-supervised Transfer Learning0.98
Islam et al. [27]2023CNN with Attention Layer0.982
Mousavi and Afghah [28]2019CNN Sequence to Sequence0.995
Akan et al. [36]2024Transformers0.98
Table 2. Summary of the most recent proposals for detecting arrhythmias using artificial intelligence and smartwatch data.
Table 2. Summary of the most recent proposals for detecting arrhythmias using artificial intelligence and smartwatch data.
StudyYearDataPatientsAccuracy
(%)
Sensitivity
(%)
Specificity
(%)
Caillol et al. [32]2021Smartwatch ECG250-2599
Ploux et al. [41]2022Smartwatch ECG260929194
Leroux et al. [42]2023Smartwatch ECG110-84100
Abu-Alrub et al. [43]2022Smartwatch ECG200-8786
Han et al. [14]2020Smartwatch ECG30959296
Racine et al. [44]2022Smartwatch ECG734-8898
Rajakariar et al. [45]2020Smartwatch ECG
and KardiaBand
35-94.481.9
Table 3. Optimal parameters for each algorithm.
Table 3. Optimal parameters for each algorithm.
ModelBest Parameters
MLPactivation: relu, alpha: 0.01, hidden_layer_sizes: (150, 150),
learning_rate: constant, solver: adam, epoch: 50
SVMC: 100, gamma: scale, kernel: rbf
Logistic RegressionC: 10, max_iter: 100, penalty: l1, solver: saga
Random Forestbootstrap: True, max_depth: 10, min_samples_leaf: 1,
min_samples_split: 2, n_estimators: 100
Gradient Boostinglearning_rate: 0.1, max_depth: 7, min_samples_leaf: 2,
min_samples_split: 2, n_estimators: 200, subsample: 0.8
Decision Treecriterion: gini, max_depth: None, max_features: None,
min_samples_leaf: 1, min_samples_split: 2, splitter: random
kNNmetric: manhattan, n_neighbors: 3, weights: distance
XGBcolsample_bytree: 0.8, learning_rate: 0.1, max_depth: 5,
n_estimators: 100, subsample: 0.8
LGBMcolsample_bytree: 0.9, learning_rate: 0.2, max_depth: 5,
n_estimators: 100, subsample: 0.8
CatBoostdepth: 7, iterations: 200, learning_rate: 0.1, subsample: 0.8
Table 4. Algorithm training and testing results.
Table 4. Algorithm training and testing results.
AlgorithmAccuracy (%)Sensitivity (%)Specificity (%)
MLP83.7875.68100
SVM87.8483.7891.89
Logistic Regression74.5167.5772.97
Random Forest89.1983.7894.59
Gradient Boosting89.1983.7894.59
Decision Tree93.2491.8994.59
kNN90.5483.7897.3
XGB89.1981.0897.3
LGBM89.1981.0897.3
CatBoost87.8481.0894.59
Table 5. Comparison with state-of-the-art methods.
Table 5. Comparison with state-of-the-art methods.
StudyYearDataPatientsAccuracy
(%)
Sensitivity
(%)
Specificity
(%)
Caillol et al. [32]2021Smartwatch ECG250-2599
Ploux et al. [41]2022Smartwatch ECG260929194
Leroux et al. [42]2023Smartwatch ECG110-84100
Abu-Alrub et al. [43]2022Smartwatch ECG200-8786
Han et al. [14]2020Smartwatch ECG30959296
Racine et al. [44]2022Smartwatch ECG734-8898
Rajakariar et al. [45]2020Smartwatch ECG
and KardiaBand
35-94.481.9
Our proposal2024Holter
Heart Rate
25293.2491.8994.59
Our proposal2024Smartwatch
Heart Rate
2570.8391.6750.0
Table 6. Model validation results on patient smartwatch samples.
Table 6. Model validation results on patient smartwatch samples.
ModelAccuracy (%)Sensitivity (%)Specificity (%)
Proposal (decision tree)70.8391.6750.0
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

Huillcen Baca, H.A.; Muñoz Del Carpio Toia, A.; Sulla Torres, J.A.; Cusirramos Montesinos, R.; Contreras Salas, L.A.; Correa Herrera, S.C. Detection of Arrhythmias Using Heart Rate Signals from Smartwatches. Appl. Sci. 2024, 14, 7233. https://doi.org/10.3390/app14167233

AMA Style

Huillcen Baca HA, Muñoz Del Carpio Toia A, Sulla Torres JA, Cusirramos Montesinos R, Contreras Salas LA, Correa Herrera SC. Detection of Arrhythmias Using Heart Rate Signals from Smartwatches. Applied Sciences. 2024; 14(16):7233. https://doi.org/10.3390/app14167233

Chicago/Turabian Style

Huillcen Baca, Herwin Alayn, Agueda Muñoz Del Carpio Toia, José Alfredo Sulla Torres, Roderick Cusirramos Montesinos, Lucia Alejandra Contreras Salas, and Sandra Catalina Correa Herrera. 2024. "Detection of Arrhythmias Using Heart Rate Signals from Smartwatches" Applied Sciences 14, no. 16: 7233. https://doi.org/10.3390/app14167233

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