Early Prediction of Cardiac Arrest Through Heart Rate Variability Analysis

DOI : 10.17577/IJERTV11IS010178

Download Full-Text PDF Cite this Publication

Text Only Version

Early Prediction of Cardiac Arrest Through Heart Rate Variability Analysis

Priyanshi Mittal1, Sushil Bansal2

1M-tech Computer Science Engineering Student, Maharaja Agrasen University, Baddi, Distt. Solan (H.P), India.

2HOD & Assistant Professor, Department of Computer Science Engineering Student, Maharaja Agrasen University, Baddi, Distt. Solan (H.P), India..

Abstract: The increase in popularity for wearable technologies (see: Apple Watch and Mi Smart Band) has opened the door for an Internet of Things solution to healthcare. One of the most prevalent healthcare problems today is the poor survival rate of out-of hospital sudden cardiac arrests (9.5% on 360,000 cases in the USA in 2013). It has been proven that heart rate derived features can give an early indicator of sudden cardiac arrest, and that providing an early warning has the potential to save many lives. Many of these new wearable devices are capable of providing this warning through their heart rate sensors.

This thesis paper introduces a prospective dataset of physical activity heart rates collected via Smart Band. This dataset is representative of the heart rates that would be observed in the proposed Internet of Things solution. This dataset is combined with public heart rate datasets to provide a dataset larger than many of the ones used in related works and more representatives of out-of-hospital heart rates. This paper introduces the use of Logit Boost as a classifier for sudden cardiac arrest prediction. Using this technique, a five minute warning of sudden cardiac arrest is provided with 96.36% accuracy and F-score of 0.9375. These results are better than existing solutions that only include in-hospital data.

Keywords: Heart Rate Variability, Machine Learning, Artificial Intelligence, IOT

INTRODUCTION:

According to the American Heart Association, approximately 360,00 cardiac arrests occurred outside of the hospital in the United States during 2013, with a survivor rate of only about 9.5%. Survival rates increase dramatically for in-hospital cardiac arrest.

Researchers believe that cardiac arrest may be predicted in advance. Specifically, through Heart Rate Variability (HRV) Analysis Algorithms, Machine Learning, the Internet of Things, and Big Data, we may be able to monitor at-risk individuals and give them advance warning (1-4 hours) to get to a hospital. There is a divide between papers focused on Electrocardiogram (ECG) features and HRV features. One such study conducted by researchers at Carnegie Mellon University and Chicago University predicted Code Blue, the call sign for someone going into cardiac arrest, with around 65% recall and 20% false positive rate on test data at 4 hours ahead of the event that focuses on ECG features. Another study was able to make predictions with the accuracies of 99.73%, 96.52%, 90.37% and 83.96% for one, two, three, and four minutes prior to the event respectively with ECG features. Murukesan et al.achieve 96.36% accuracy through the use of SVM and HRV features. This paper uses a five minute advance warning and two minutes of sample data. This is the baseline that this paper uses. HRV is the preferred feature set due to allow for a broader spectrum of potential

commercial wearable devices. A significant benefit of such advance warning is corroborating evidence of the need to go to the hospital rather than ignoring symptoms. Developments in wearable technology and advancements in non-intrusive heart rate monitors may allow for a future where people can stream their heart rate readings, with the readings automatically analysed by robust machine learning algorithms which will alert cardiac arrest risk

This field is new and there is room for progress through additional studies and the development of HRV Analysis Algorithms. This is supported by the increasing number of medical records stored electronically.

LITERATURE REVIEW:

Joo et al. use artificial neural networks to achieve a 76.6% accuracy. The authors use the Spontaneous Ventricular Tachyarrhythmia Database which contains 106 pre-VT records and 126 control sets. The authors examine a five minute window of data that exists ten seconds before the event.

Jinkwon Kim et al. [20] use the MIT-BIH arrhythmia database to compare classification using an extreme learning machine, back propagation neural network, radial basis function neural network, and support vector machine. They are classified into six classes of ECG. The authors find that the extreme learning machine performs faster than the other three approaches, and their system has 98.72% average accuracy.

k-Nearest Neighbor Solution

Ebrahimzadeh et al. [8] use k-nearest neighbor (k-NN) and multilayer perceptron neural network (MLP) to classify patients that will experience cardiac arrest. The authors use time-frequency and nonlinear features from heart rate variability (HRV) of ECG signals to improve this prediction task. The authors achieved accuracies of 99.73%, 96.52%, 90.37% and 83.96% for first, second, third, and forth one- minute intervals respectively.

Support Vector Machine Solution

Murukesan et al. [23] achieve 96.36% accuracy through the use of a SVM. The authors use the MIT/BIH Sudden Cardiac Death database (23 subjects) and the MIT/BIH Normal Sinus Rhythm database (18 subjects) [12]. The authors use five minutes of the ECG signal for HRV features which is two minutes prior to the onset of SCA. The authors of this paper focus specifically on the selection of features using the Sequential Feature Selection algorithm. The authors start with 34 features but determined that the

selection of seven features provided optimal results. The authors also tested with a Probabilistic Neural Network to achieve a lesser 93.54%. The feature selection portion of this paper is advanced, but there are a small amount of samples used. This means that their solution is more likely to be specialized to the dataset and not representative of the real world.

Artificial Neural Networks Solution

Joo et al. [19] use artificial neural networks to achieve a 76.6% accuracy. The authors use the Spontaneous Ventricular Tachyarrhythmia Database [12] which contains

106 pre-VT records and 126 control sets. The authors examine a five minute window of data that exists ten seconds before the event.

METHODOLOGY:

The Heart:

The heart undergoes states of depolarization and repolarization when it beats. Echoes of these states are sent electronically throughout the body. Cardiologists use electrodes, sensitive receivers, to pick up those electronic echoes. In cardiology, these electrodes are named leads. In a standard 12 lead system, six leads will go onto the chest and six leads will be placed along the limbs. These leads give a multidimensional view of the heart. The recording of this electrical activity is called an electrocardiogram (ECG).

ECG Signal:

There are five nodes on the ECG signal which are used to derive different features. These nodes are labeled P, Q, R, S, T, and U. These are broken into a P wave, QRS complex, a T wave, and a U wave. One of these features is the RR interval, the period between two R nodes on an ECG. This interval is representative of a persons heart rate. The distance between two R waves represents a persons instantaneous heart rate. See Fig. 2.1 for more details on the ECG signal.

having the potential to provide more information.

A regular ECG signal is called a regular sinus rhythm. There are specific classes of ECG signals representative of what is going on inside the heart. There are a couple key vocabulary words that re used to identify these different classes. Based on these terms, we can determine an arrhythmia such as Ventricular Tach- yarrhythmia (VT) is a rapid heartbeat that starts in the bottom chambers of the heart. VT is one of the main arrhythmias associated with sudden cardiac arrest. These arrhythmias have certain classifying features. For example, VT is easily identified by the fast oscillatory waves, which represent the rapid twitching of the heart.

Cardiac Arrest

Cardiac arrest occurs when the beating of the heart and all electrical activity stops. This means that blood stops pumping to the body, and is especially important because brain damage can occur within ten minutes from blood loss to the brain. This is different from a heart attack, which is a physical failure in comparison to an electrical failure. Heart attacks are caused by the blockage of blood flow to the heart. To use analogies, heart attacks are caused by faulty plumbing while cardiac arrest is caused by a power outage. Sudden cardiac arrest (SCA) is cardiac arrest that occurs unexpectedly and can result in death, called sudden cardiac death (SCD). There are three main arrhythmia classes that correlate with cardiac arrest: Ventricular Tachyarrhythmia (VT), Ventricular Asystole (VA), and Pulseless Electrical Activity (PEA). VT is described in the previous section, and is the most common predecessor to SCA. VA is represented by a flat line. PEA is especially difficult, as the person may have regular rhythms, but not enough mechanical activity to pump blood effectively.

Naive Bayes

Naive Bayes is a classification algorithm based on the Bayes theorem, seen in Fig

Figure 2.1: ECG Signal for a Normal Sinus Rhythm

Heart rate variability:

  1. P(Class) and P(Features) are the probabilities of the set of features and the class without regard to each other.

  2. P(Class Features) is the conditional probability of a class given a set of features.

  3. P(Features Class) is the probability of a set of features given the class.

This classifier uses the theorem to derive the probability that a given feature vector is associated with a specific class. The algorithm naively assumes that there is an independence between every pair of features. This assumption creates a weakness in the algorithm, because there will almost never be an independence between every pair of features given enough features. Regardless, the classification algorithm is

Heart rate is a feature which can be derived from the ECG

signal. This is done by comparing the placement between the RR intervals. Each peak on the R wave represents a node in the heart rate array. The time between each R wave peak is the instantaneous heart rate. It is potentially inconvenient to spend the whole day with 12 electrodes attached to the body, and there is technology to track the heart rate without use of an ECG signal. This creates a preference to have a system which relies on more convenient sensors (wearable devices) in comparison to 12 ECG electrodes, despite the electrodes

proven to be strong in smaller training sets.

Figure: Bayes Theorem

Boosting

The main idea of the boosting algorithm is to use a set of weak learners to help build a better classifier (called the

strong learner). Each weak learner is assigned a weight during training which indicates how much consideration that weak learners classification is used during testing. The strength of this algorithm is that each weak learner needs to only be a little bit better than a guess, and the distribution of weights will allow the strong learner to create accurate predictions.

This paper utilises the LogitBoost algorithm. Fig. 2.6 shows the algorithm demonstrated by Schapire and Fruend. LogitBoost is different from other boosting algorithms in that it uses the log-likelihood loss for binary classification.

Figure 2.6: LogitBoost Algorithm

RELATED WORK:

Cardiac Arrest Prediction through HRV Features

This section is devoted to papers focused on HRV features rather than ECG features. In all cases, the HRV is derived from ECG signals. In contrast, this paper includes a dataset that does not have ECG-derived heart rates.

To determine abnormal heart patterns, we first establish a criterion for normal heart rate. Quantitative analysis of heart rate stability and pulse symmetry will yield a series of parameters, like heart rate, RR intervals (RR interval is the duration between two consecutive R peaks in an ECG signal), and ST segments (ST segment is the flat section of the ECG signal between the end of the S wave and the beginning of the T wave. It represents the interval between ventricular depolarization and repolarization). We then design an early warning system to monitor those parameters for signs of cardiac arrest during any activity.

Although the system continuously monitors ECG patterns, the planned design only triggers a warning if the ECG patterns and body temperature of the user reaches a certain threshold level, wherein the user might face a potential heart attack. At that moment, the system transmits a warning to the subject in the form of a message or a vibration alert. Figure 1 illustrates the prototype embedded smart IoT system.

Fig: Physical Heart Rate Activity Dataset Distribution

Fig: Physical Heart Rate Activity Dataset Distribution

This paper introduces the use of a prospective study that may be representative of future heart rates of people using a commercially available wearable device. The prospective physical activity dataset in this paper is collected from a Mi Band. This dataset features the two minute samples of the heart rates of five individuals performing ten unique activities. The distribution of these activities is detailed in Fig. 4.5. A table is provided with the counts as well in Table

4.2. There are a total 105 samples in this dataset. The physical features of these product evaluators is available in Table 4.3. All product evaluators are current Cal Poly San Luis Obispo students. Each evaluator represents a range of physical fitness, as the resting heart rates range from 54 beats per minute (bpm) to 70 bpm. The derived features of these samples are shown in Fig. 4.6.

For data collection purposes, the product evaluators are told to breathe and move normally. The recording is a two minute sample that is started and ending during the activity, and not before or after. Each sample is from a normal workday hours (9 am to 5 pm) and not during any exhausting timeslot (after or before waking hours). Each activity is sampled with at least a two minute resting period between each activity so that there is no bleeding between

I D

Gender

Age

Height

Weight

Weekly Exercise Amounts

0

Male

23

5 Feet 8 Inches

150 lbs.

1 times per week

1

Male

23

5 Feet 8 Inches

160 lbs.

6 times per week

2

Male

23

6 Feet 2 Inches

200 lbs.

6 times per week

3

Male

21

6 Feet 0 Inches

180 lbs.

4 times per week

4

Male

21

6 Feet 2 Inches

220 lbs.

2 times per week

I D

Gender

Age

Height

Weight

Weekly Exercise Amounts

0

Male

23

5 Feet 8 Inches

150 lbs.

1 times per week

1

Male

23

5 Feet 8 Inches

160 lbs.

6 times per week

2

Male

23

6 Feet 2 Inches

200 lbs.

6 times per week

3

Male

21

6 Feet 0 Inches

180 lbs.

4 times per week

4

Male

21

6 Feet 2 Inches

220 lbs.

2 times per week

activities. This bleeding may have an effect on the heart rates and is avoided [11]. This connection of the strap to the evaluators wrist is checked before and after each sample to make sure that the connectivity of the sensor to the wrist is strong. Each beat is sent to an iPhone which hosts an application that stores the two minute recording before shipping it off via HTTP PUT request to a Google Cloud server. During the collection process, no product evaluators had heart or physical conditions with no prescriptions that would affect results. The product evaluators also sign a form agreeing to volunteer for the evaluation.

Table 4.3: Physical Heart Rate Activity Dataset Evaluators EXPERIMENTATION:

For each experiment, the data set is randomly divided into a training and testing set, and contains an even distribution of HRV classes. The training and testing splits are 10%-90%, 20-80%, 30-70%, 50-50%, and 70-30%. This will

demonstrate the strengths of different machine learning algorithms based on how much data they require to train on before showing success.

The machine learning algorithms that are compared include Support Vector Machine with a linear kernel, Decision Trees, Naive Bayes, Stochastic Gradient Descent, and LogitBoost. Comparisons are done in terms of training rate as well as accuracy. The algorithms are derived from the

0.16.1 version of the Scikit-Learn Python library. The LogitBoost implementation uses Support Vector Machine with a linear kernel, Decision Trees, Naive Bayes, and Stochastic Gradient Descent as weak learners. Unless stated otherwise, the LogitBoost classifier uses five of each weak learner (a total of 20).

The weak learners and comparative classifiers in this chapter use the default settings from the Scikit-Learn Python library unless stated otherwise. The SVM classifier uses a linear kernel with the C parameter set to 0.1 and gamma set to 0.0 (defaulting to 1 / number of features). The SGD has an alpha parameter of 0.0001, no penalty parameter set, and a hinge loss function. The Naive Bayes implementation has an alpha parameter of 1.0 with uniform prior probabilities. The Decision Tree implementation has no max features set, no max depth set, and the minimum number of samples for an internal node split set to two.

Accuracy Results

Accuracy of LogitBoost vs. SVM

The first two tables of this section compare the LogitBoost classifier accuracy to the SVM classifier accuracy. Table 4.5 details the 70-30% training vs. test split of a SVM vs. LogitBoost accuracy. The results in this table are collected using all of the datasets. Table 4.6 details the 70-30% training vs. test split of a SVM vs. LogitBoost accuracy. The results in this table are collected without using the physical activity dataset collected via Mi Band.

Run 70%-

30% (186/92)

SVM

Accuracy

LogitBoost Accuracy

0

0.9194

0.9731

1

0.9355

0.9570

2

0.9463

0.9463

3

0.9516

0.9731

4

0.9462

0.9677

5

0.9354

0.9624

Average

0.9391

0.9633

Std. Dev.

0.0116

0.0104

SVM vs. LogitBoost Classification Results With Physical Activities.

The classification accuracy across 278 samples. This uses a 70-30 training vs. testing split, training on 186 samples and testing on 92.

Run 70%-30% (121/52)

SVM

Accuracy

LogitBoost Accuracy

0

0.8620

0.9310

1

0.8965

0.9137

2

0.9051

0.9137

3

0.9137

0.9482

4

0.8879

0.9224

Average

0.8931

0.9259

Std. Dev.

0.0198

0.0144

Table 4.6: SVM vs. LogitBoost Classification Results Without Physical Activities:

SVM vs. LogitBoost Classification Results Without Physical Activities. The classification accuracy across 173 samples. This uses a 70%-30% training vs. testing split, training on 121 samples and testing on 52.

TEST RESULTS AND DISCUSSION:

Fig. 4.15 and Fig. 4.16 shows the comparative precision and recall respectively between the SVM and LogitBoost classifier. The LogitBoost classifier has much higher precision, but comparable recall to the SVM classifier. Table 4.14 details the Precision, Recall and F-score of the LogitBoost classifier on multiple training-testing dataset splits accompanied by the accuracy of those splits. Table

4.15 details the Precision, Recall and F-score of the SVM classifier on multiple training-testing dataset splits accompanied by the accuracy of those splits. These values are the average of five runs each. The F-score for the LogitBoost classifier is consistent despite the varying number of training samples. The SVM classifier becomes weaker as the number of training samples decreases.

Figure 4.15: Precision vs. Dataset Split

This chart shows the Precision for each classifier at different training-testing splits. The positive label used in the F-score is the Sudden Cardiac Death class.

Figure 4.16: Recall vs. Dataset Split

This chart shows the Recall for each classifier at different training-testing splits. The positive label used in the F-score is the Sudden Cardiac Death class.

CONCLUSION:

This paper presents a new sudden cardiac arrest prediction technique, a LogitBoost classifier implementation for multiple weak learners, a prospective physical activity heart rate dataset, and an Internet of Things solution towards heart rate monitoring and sudden cardiac arrest warning. Using a 70%-30% training-testing split, the work in this paper is able to achieve a 96.33% accuracy with a 0.9375 F-score for the classification of sudden cardiac arrest prediction. Comparably, Murukesan et al. achieve 96.36% accuracy, but their approach uses a smaller dataset and does not include physical activity heart rates.

This papers approach uses HRV derived features on two minute samples of heart rate data. This paper proves that it is possible to classify resting as well as active heart rates against the heart rates of people about to go into sudden cardiac arrest. The inclusion of heart rate data from a wearable device also proves that there is a future for sudden cardiac arrest prediction through wearable devices.

REFERENCES:

  1. K. Bache and M. Lichman. UCI machine learning repository, 2013.

  2. M. Beck. If youre stricken, minutes matter, yet many ignore signs, delay treatment. 2012.

  3. K. P. Birman. Rule-based learning for more accurate ecg analysis. Pattern Analysis and Machine Intelligence, IEEE Transactions on, pages 369380, 1982.

  4. M. M. Churpek, T. C. Yuen, M. T. Huber, S. Y. Park, J. B. Hall, and

    D. P. Edelson. Predicting cardiac arrest on the wards in-hospital cardiac rrest prediction a nested case-control study. CHEST Journal, 141(5):11701176, 2012.

  5. C. Cortes and V. Vapnik. Support-vector networks. Machine learning, 20(3):273297, 1995.

  6. Z. Dokur and T. O¨ lmez. Ecg beat classification by a novel hybrid neural network.

  7. Computer methods and programs in biomedicine, 66(2):167181, 2001.

  8. E. Ebrahimzadeh, M. Pooyan, and A. Bijar. A novel approach to predict sudden cardiac death (scd) using nonlinear and time- frequency analyses from hrv signals. PloS one, 9(2):e81896, 2014.

  9. A. S. Go, D. Mozaffarian, V. L. Roger, E. J. Benjamin, J. D. Berry,

    W. B. Borden,

  10. D. M. Bravata, S. Dai, E. S. Ford, C. S. Fox, et al. Heart disease and stroke statistics2013 update: a report from the american heart association. Circulation, 127(1):e6, 2013.

  11. K. Goh, J. Lavanya, Y. Kim, E. Tan, and C. Soh. A pda-based ecg beat detector for home cardiac care. In Engineering in Medicine and Biology Society, 2005. IEEE- EMBS 2005. 27th Annual International Conference of the, pages 375378. IEEE, 2006.

  12. A. L. Goldberger. Clinical electrocardiography: a simplified approach. Elsevier Health Sciences, 2012.

  13. A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov,

  14. R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley. Components of a new research resource for complex physiologic signals, 2000.

  15. H. A. Guvenir, S. Acar, G. Demiroz, and A. Cekin. A supervised machine learning algorithm for arrhythmia analysis. In Computers in Cardiology 1997, pages 433436. IEEE, 1997.

  16. N. P. Hughes, L. Tarassenko, and S. J. Roberts. Markov models for automated ecg interval analysis. In Advances in Neural Information Processing Systems, page None, 2003.

  17. S. Jadhav, S. Nalbalwar, and A. Ghatol. Artificial neural network based cardiac arrhythmia classification using ecg signal data. In Electronics and Information Engineering (ICEIE), 2010 International Conference On, volume 1, pages V1228. IEEE, 2010.

  18. Z. Jin, J. Oresko, S. Huang, and A. C. Cheng. Heart to go: a personalized medicine technology for cardiovascular disease prevention and detection. In Life Science Systems and Applications Workshop, 2009. LiSSA 2009. IEEE/NIH, pages 8083. IEEE, 2009.

  19. Z. Jin, Y. Sun, and A. C. Cheng. Predicting cardiovascular disease from real- time electrocardiographic monitoring: An adaptive machine learning approach on a cell phone. In Engineering in Medicine and Biology Society, 2009. EMBC 2009. Annual International Conference of the IEEE, pages 68896892. IEEE, 2009.

  20. S. Joo, K.-J. Choi, and S.-J. Huh. Prediction of ventricular tachycardia by a neural network using parameters of heart rate variability. In Computing in Cardiology, 2010, pages 585588, Sept 2010.

  21. J. Kim, H. S. Shin, K. Shin, and M. Lee. Robust algorithm for arrhythmia classification in ecg using extreme learning machine. Biomed Eng Online, 8:31, 2009.

  22. S. Kotsiantis, I. Zaharakis, and P. Pinetlas. Machine learning: a review of classification and combining techniques. Artificial Intelligence Review, 26:159190, 2006.

  23. E. Kuronen et al. Epic sensors in electrocardiogram measurement. 2013.

  24. L. Murukesan, M. Murugappan, and M. Iqbal. Sudden cardiac death prediction using ecg signal derivative (heart rate variability): A review. In Signal Processing and its Applications (CSPA), 2013 IEEE 9th International Colloquium on, pages 269274, March 2013.

  25. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel,

  26. M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas,

    1. Passos,

  27. A. Reiss and D. Stricker. Introducing a new benchmarked dataset for activity monitoring. The 16th IEEE International Symposium on Wearable Computers (ISWC), 16, 2012.

  28. J. Rodriguez, A. Goni, and A. Illarramendi. Real-time classification of ecgs on a pda. Information Technology in Biomedicine, IEEE Transactions on, 9(1):2334, 2005.

  29. R. Schapire and Y. Freund. Boosting: Foundations and algorithms. 2014.

  30. T. Soman and P. O. Bobbie. Classification of arrhythmia using

    machine learning techniques. WSEAS Transactions on computers, 4(6):548552, 2005.

  31. S. Somanchi, S. Adhikari, A. Lin, E. Eneva, and R. Ghani. Early code blue prediction using patient medical records.

  32. F. Wang, R. Quiniou, G. Carrault, and M.-O. Cordier. Learning structural knowledge from the ecg. In Medical Data Analysis, pages 288294. Springer, 2001.

  33. Z.-D. Zhao and Y.-Q. Chen. A new method for removal of baseline wander and power line interference in ecg signals. In Machine Learning and Cybernetics, 2006 International Conference on, pages 43424347. IEEE, 2006.

  34. PAMAP2 Physical Activity Monitoring Data Set can be downloaded from the website of UCI machine learning repository (https://archive.ics.uci.edu/ml/datasets/ PAMAP2+Physical+Activity+Monitoring).

  35. AKM Jahangir Alam Majumder, Yosuf Amr ElSaadany, Roger Young, Donald R. Ucci, "An Energy Efficient Wearable Smart IoT System to Predict Cardiac Arrest", Advances in Human-Computer Interaction, vol. 2019, Article ID 1507465, 21 pages, 2019. https://doi.org/10.1155/2019/1507465

Leave a Reply