Stress Detection Application based on Heart Rate Variability (HRV) and K-Nearest Neighbor (KNN)

Author(s):  
Prima Dewi Purnamasari ◽  
Ramdhaidfitri Martmis ◽  
Rizky Ramadian Wijaya
Author(s):  
Bimo Sunarfri Hantono ◽  
◽  
Lukito Edi Nugroho ◽  
Paulus Insap Santosa ◽  
◽  
...  

Mental stress is an undesirable condition for everyone. Increased stress can cause many problems, such as depression, heart attacks, and strokes. Psychophysiological conditions possible use as a reference to a person’s mental state of stress. The development of mobile device technology, along with the accompanying sensors, can be used to measure the psychophysiological condition of its users. Heart rate allows measured from the photoplethysmography signal utilizing a smartphone or smartwatch. The heart rate variability is currently one of the most studied methods for assessing mental stress. Our objective is to analyze stress levels on the subjects when performing tasks on the smartphone. This study involved 41 students as respondents. Their heart rate was recorded using a smartphone while they were doing the n-back tasks. The n-back task is one of the performance tasks used to measure working memory and working memory capacity. In this study, the n-back task was also used as a stressor. The heart rate dataset and n-back task results are then processed and analyzed using machine learning to determine stress levels. Compared with three other algorithms (neural network, discriminant analysis, and naïve Bayes), the k-nearest neighbor algorithm is most appropriate to use in the classification of time and frequency domain analysis.


2020 ◽  
Vol 10 (3) ◽  
pp. 769-774
Author(s):  
Shiliang Shao ◽  
Ting Wang ◽  
Chunhe Song ◽  
Yun Su ◽  
Xingchi Chen ◽  
...  

In this paper, eight novel instantaneous indices of short-time heart rate variability (HRV) signals are proposed for prediction of cardiovascular and cerebrovascular events. The indices are based on Bubble Entropy (BE) and Singular Value Decompose (SVD). The process of indices calculation is as follows, firstly, the instantaneous amplitude (IA), instantaneous frequency (IF) and instantaneous phase (IP) of HRV signals are estimated by the Hilbert transform. Secondly, according to the HRV, IA, IP and IF, the BE and singular value (SV) is calculated, then eight novel indices are obtained, they are BEHRV, BEIA, BEIF, BEIP, SVHRV, SVIA, SVIF and SVIP. Last but not least, in order to evaluate the performance of the eight novel indices for prediction of cardiovascular and cerebrovascular events, the difference analysis of eight indices is carried out by t-test. According to the p value, seven of the eight indices BEHRV, BEIA, BEIF, BEIP, SVIA, SVIF and SVIP are thought to be the indices to discriminate the E group and N group. The K-nearest neighbor (KNN), support vector machine (SVM) and decision tree (DT) are applied on the seven novel indices. The results are that, seven novel indices are significantly different between the events and non-events groups, and the SVM classifier has the highest classification Acc and Spe for prediction of cardiovascular and cerebrovascular events, they are 88.31% and 90.19%, respectively.


2020 ◽  
Vol 32 (02) ◽  
pp. 2050009
Author(s):  
Kirti Tripath ◽  
Harsh Sohal ◽  
Shruti Jain

This article proposes a computer-aided diagnostic system for feature-based selection classification (CAD-FSC) to detect arrhythmia, atrial fibrillation and normal sinus rhythm. The CAD-FSC methodology encompasses of ECG signal processing phases: ECG pre-processing, R-peak detection, feature extraction, feature selection and ECG classification. Digital filters are used to pre-process the ECG signal and the R-peak is detected by using the Pan-Tompkin’s algorithm. The heart rate variability (HRV) features are extracted in time and frequency domains. Among them, the prominent features are selected with analysis of variance (ANOVA) using Statistical Package for the Social Sciences (SPSS) tool. Cubic support vector machine (C-SVM), coarse Gaussian support vector machine (CG-SVM), cubic k-nearest neighbor (C-kNN) and weighted k-nearest neighbor (W-kNN) classifiers are utilized to validate the CAD-FSC system for three-stage classification. The C-SVM outperforms all other classifiers by giving higher overall accuracy of 98.4% after feature selection of time domain and frequency domain.


Paroxysmal atrial fibrillation (PAF) is the mainly encountered type of arrhythmia and there is no validated method to predict a PAF attack before it occurs. In this study, predicting the PAF event was aimed using time-domain heart rate variability (HRV) measures in k- nearest neighbor (k-nn) classifier. Traditional time-domain HRV measures were analyzed in every 5-minute segments from 49 normal subjects, 25 patients with PAF attack and 25 patients with no attack within 45 minutes. All features were investigated whether they showed statistically significance. Significant features were classified by k-nn for odd numbers of neighbors between 1 and 19. This setup was run with two different configurations as study 1 to discriminate patients with PAF attack from normals and patients with no attack, and study 2 to discriminate patients with PAF attack from patients with no attack. SDNN, RMSSD and pNN50 measures were found to show statistically significant differences with p less than 0.05 in segments of 0-5 min, 2.5-7.5 min and 5-10 min intervals only. The maximum classification accuracy was obtained in the time interval of 2.5-7.5 minutes with %79 for Study 1 and just before attack with %80 for Study 2 in the time interval of 0-5 minutes. Results showed that the prediction of PAF events was possible when the classification between normal subjects from PAF patients was accurate. PAF attack can be determined 2.5 minutes earlier by simple classifier algorithms.


Sensors ◽  
2021 ◽  
Vol 21 (10) ◽  
pp. 3461
Author(s):  
Blake Anthony Hickey ◽  
Taryn Chalmers ◽  
Phillip Newton ◽  
Chin-Teng Lin ◽  
David Sibbritt ◽  
...  

Recently, there has been an increase in the production of devices to monitor mental health and stress as means for expediting detection, and subsequent management of these conditions. The objective of this review is to identify and critically appraise the most recent smart devices and wearable technologies used to identify depression, anxiety, and stress, and the physiological process(es) linked to their detection. The MEDLINE, CINAHL, Cochrane Central, and PsycINFO databases were used to identify studies which utilised smart devices and wearable technologies to detect or monitor anxiety, depression, or stress. The included articles that assessed stress and anxiety unanimously used heart rate variability (HRV) parameters for detection of anxiety and stress, with the latter better detected by HRV and electroencephalogram (EGG) together. Electrodermal activity was used in recent studies, with high accuracy for stress detection; however, with questionable reliability. Depression was found to be largely detected using specific EEG signatures; however, devices detecting depression using EEG are not currently available on the market. This systematic review highlights that average heart rate used by many commercially available smart devices is not as accurate in the detection of stress and anxiety compared with heart rate variability, electrodermal activity, and possibly respiratory rate.


2021 ◽  
Vol 8 (1) ◽  
Author(s):  
Aaron Frederick Bulagang ◽  
James Mountstephens ◽  
Jason Teo

Abstract Background Emotion prediction is a method that recognizes the human emotion derived from the subject’s psychological data. The problem in question is the limited use of heart rate (HR) as the prediction feature through the use of common classifiers such as Support Vector Machine (SVM), K-Nearest Neighbor (KNN) and Random Forest (RF) in emotion prediction. This paper aims to investigate whether HR signals can be utilized to classify four-class emotions using the emotion model from Russell’s in a virtual reality (VR) environment using machine learning. Method An experiment was conducted using the Empatica E4 wristband to acquire the participant’s HR, a VR headset as the display device for participants to view the 360° emotional videos, and the Empatica E4 real-time application was used during the experiment to extract and process the participant's recorded heart rate. Findings For intra-subject classification, all three classifiers SVM, KNN, and RF achieved 100% as the highest accuracy while inter-subject classification achieved 46.7% for SVM, 42.9% for KNN and 43.3% for RF. Conclusion The results demonstrate the potential of SVM, KNN and RF classifiers to classify HR as a feature to be used in emotion prediction in four distinct emotion classes in a virtual reality environment. The potential applications include interactive gaming, affective entertainment, and VR health rehabilitation.


Sign in / Sign up

Export Citation Format

Share Document