DOI: 10.5281/zenodo.8171265
title: HRV-ACC: a dataset with R-R intervals and accelerometer data for the diagnosis of psychotic disorders using a Polar H10 wearable sensor

description: <strong>ABSTRACT</strong> The issue of diagnosing psychotic diseases, including schizophrenia and bipolar disorder, in particular, the objectification of symptom severity assessment, is still a problem requiring the attention of researchers. Two measures that can be helpful in patient diagnosis are heart rate variability calculated based on electrocardiographic signal and accelerometer mobility data. The following dataset contains data from 30 psychiatric ward patients having schizophrenia or bipolar disorder and 30 healthy persons. The duration of the measurements for individuals was usually between 1.5 and 2 hours. R-R intervals necessary for heart rate variability calculation were collected simultaneously with accelerometer data using a wearable Polar H10 device. The Positive and Negative Syndrome Scale (PANSS) test was performed for each patient participating in the experiment, and its results were attached to the dataset. Furthermore, the code for loading and preprocessing data, as well as for statistical analysis, was included on the corresponding GitHub repository. <strong>BACKGROUND</strong> Heart rate variability (HRV), calculated based on electrocardiographic (ECG) recordings of R-R intervals stemming from the heart's electrical activity, may be used as a biomarker of mental illnesses, including schizophrenia and bipolar disorder (BD) [Benjamin et al]. The variations of R-R interval values correspond to the heart's autonomic regulation changes [Berntson et al, Stogios et al]. Moreover, the HRV measure reflects the activity of the sympathetic and parasympathetic parts of the autonomous nervous system (ANS) [Task Force of the European Society of Cardiology the North American Society of Pacing Electrophysiology, Matusik et al]. Patients with psychotic mental disorders show a tendency for a change in the centrally regulated ANS balance in the direction of less dynamic changes in the ANS activity in response to different environmental conditions [Stogios et al]. Larger sympathetic activity relative to the parasympathetic one leads to lower HRV, while, on the other hand, higher parasympathetic activity translates to higher HRV. This loss of dynamic response may be an indicator of mental health. Additional benefits may come from measuring the daily activity of patients using accelerometry. This may be used to register periods of physical activity and inactivity or withdrawal for further correlation with HRV values recorded at the same time. <strong>EXPERIMENTS</strong> In our experiment, the participants were 30 psychiatric ward patients with schizophrenia or BD and 30 healthy people. All measurements were performed using a Polar H10 wearable device. The sensor collects ECG recordings and accelerometer data and, additionally, prepares a detection of R wave peaks. Participants of the experiment had to wear the sensor for a given time. Basically, it was between 1.5 and 2 hours, but the shortest recording was 70 minutes. During this time, evaluated persons could perform any activity a few minutes after starting the measurement. Participants were encouraged to undertake physical activity and, more specifically, to take a walk. Due to patients being in the medical ward, they received instruction to take a walk in the corridors at the beginning of the experiment. They were to repeat the walk 30 minutes and 1 hour after the first walk. The subsequent walks were to be slightly longer (about 3, 5 and 7 minutes, respectively). We did not remind or supervise the command during the experiment, both in the treatment and the control group. Seven persons from the control group did not receive this order and their measurements correspond to freely selected activities with rest periods but at least three of them performed physical activities during this time. Nevertheless, at the start of the experiment, all participants were requested to rest in a sitting position for 5 minutes. Moreover, for each patient, the disease severity was assessed using the PANSS test and its scores are attached to the dataset. The data from sensors were collected using Polar Sensor Logger application [Happonen]. Such extracted measurements were then preprocessed and analyzed using the code prepared by the authors of the experiment. It is publicly available on the GitHub repository [Książek et al]. Firstly, we performed a manual artifact detection to remove abnormal heartbeats due to non-sinus beats and technical issues of the device (e.g. temporary disconnections and inappropriate electrode readings). We also performed anomaly detection using Daubechies wavelet transform. Nevertheless, the dataset includes raw data, while a full code necessary to reproduce our anomaly detection approach is available in the repository. Optionally, it is also possible to perform cubic spline data interpolation. After that step, rolling windows of a particular size and time intervals between them are created. Then, a statistical analysis is prepared, e.g. mean HRV calculation using the RMSSD (Root Mean Square of Successive Differences) approach, measuring a relationship between mean HRV and PANSS scores, mobility coefficient calculation based on accelerometer data and verification of dependencies between HRV and mobility scores. <strong>DATA DESCRIPTION</strong> The structure of the dataset is as follows. One folder, called <em>HRV_anonymized_data</em> contains values of R-R intervals together with timestamps for each experiment participant. The data was properly anonymized, i.e. the day of the measurement was removed to prevent person identification. Files concerned with patients have the name <em>treatment_X.csv</em>, where <em>X</em> is the number of the person, while files related to the healthy controls are named <em>control_Y.csv</em>, where <em>Y</em> is the identification number of the person. Furthermore, for visualization purposes, an image of the raw RR intervals for each participant is presented. Its name is <em>raw_RR_{control,treatment}_N.png</em>, where <em>N</em> is the number of the person from the control/treatment group. The collected data are raw, i.e. before the anomaly removal. The code enabling reproducing the anomaly detection stage and removing suspicious heartbeats is publicly available in the repository [Książek et al]. The structure of consecutive files collecting R-R intervals is following: <strong>Phone timestamp</strong> <strong>RR-interval [ms]</strong> 12:43:26.538000 651 12:43:27.189000 632 12:43:27.821000 618 12:43:28.439000 621 12:43:29.060000 661 ... ... The first column contains the timestamp for which the distance between two consecutive R peaks was registered. The corresponding R-R interval is presented in the second column of the file and is expressed in milliseconds. <br> The second folder, called <em>accelerometer_anonymized_data</em> contains values of accelerometer data collected at the same time as R-R intervals. The naming convention is similar to that of the R-R interval data: <em>treatment_X.csv </em>and <em>control_X.csv</em> represent the data coming from the persons from the treatment and control group, respectively, while <em>X </em>is the identification number of the selected participant. The numbers are exactly the same as for R-R intervals. The structure of the files with accelerometer recordings is as follows: <strong>Phone timestamp</strong> <strong>X [mg]</strong> <strong>Y [mg]</strong> <strong>Z [mg]</strong> 13:00:17.196000 -961 -23 182 13:00:17.205000 -965 -21 181 13:00:17.215000 -966 -22 187 13:00:17.225000 -967 -26 193 13:00:17.235000 -965 -27 191 ... ... ... ... The first column contains a timestamp, while the next three columns correspond to the currently registered acceleration in three axes: X, Y and Z, in milli-g unit. We also attached a file with the PANSS test scores (<em>PANSS.csv</em>) for all patients participating in the measurement. The structure of this file is as follows: <strong>no_of_person</strong> <strong>PANSS_P</strong> <strong>PANSS_N</strong> <strong>PANSS_G</strong> <strong>PANSS_total</strong> 1 8 13 22 43 2 11 7 18 36 3 14 30 44 88 4 18 13 27 58 ... ... ... ... .. <br> The first column contains the identification number of the patient, while the three following columns refer to the PANSS scores related to positive, negative and general symptoms, respectively. <strong>USAGE NOTES</strong> All the files necessary to run the HRV and/or accelerometer data analysis are available on the GitHub repository [Książek et al]. HRV data loading, preprocessing (i.e. anomaly detection and removal), as well as the calculation of mean HRV values in terms of the RMSSD, is performed in the <em>main.py</em> file. Also, Pearson's correlation coefficients between HRV values and PANSS scores and the statistical tests (Levene's and Mann-Whitney U tests) comparing the treatment and control groups are computed. By default, a sensitivity analysis is made, i.e. running the full pipeline for different settings of the window size for which the HRV is calculated and various time intervals between consecutive windows. Preparing the heatmaps of correlation coefficients and corresponding p-values can be done by running the <em>utils_advanced_plots.py</em> file after performing the sensitivity analysis. Furthermore, a detailed analysis for the one selected set of hyperparameters may be prepared (by setting <em>sensitivity_analysis = False</em>), i.e. for 15-minute window sizes, 1-minute time intervals between consecutive windows and without data interpolation method. Also, patients taking quetiapine may be excluded from further calculations by setting <em>exclude_quetiapine = True</em> because this medicine can have a strong impact on HRV [Hattori et al]. The accelerometer data processing may be performed using the <em>utils_accelerometer.py</em> file. In this case, accelerometer recordings are downsampled to ensure the same timestamps as for R-R intervals and, for each participant, the mobility coefficient is calculated. Then, a correlation coefficient between mean HRV values and mobility coefficient is computed. The plotting of the pure accelerometer signal may be done by running the <em>utils_loading.py </em>file. The comparison of age distribution between the tested groups can be made by the histogram plotted with the use of the <em>utils_basic_plots.py</em> file.
description: The study was approved by the Bioethics Committee of the Medical University of Silesia, No.: BNW/NWN/0052/KB1/135/I/22/23.
description: {"references": ["B. R. Benjamin et al, Heart rate variability is associated with disease severity in psychosis spectrum disorders, Progress in Neuro-Psychopharmacology and Biological Psychiatry, Vol. 11, 110108, ISSN 0278-5846, DOI: 10.1016/j.pnpbp.2020.110108, 2021.", "G. G. Berntson et al, Heart rate variability: Origins, methods, and interpretive caveats, Psychophysiology, Vol. 34, Issue 6, DOI: 10.1111/j.1469-8986.1997.tb02140.x, 1997, pp. 623-648.", "N. Stogios et al, Autonomic nervous system dysfunction in schizophrenia: impact on cognitive and metabolic health, npj Schizophrenia, Vol. 7, No. 22, DOI: 10.1038/s41537-021-00151-6, 2021.", "Task Force of the European Society of Cardiology the North American Society of Pacing Electrophysiology, Heart Rate Variability: Standards of Measurement, Physiological Interpretation, and Clinical Use, Circulation, Vol. 93, Issue 5, DOI: 10.1161/01.CIR.93.5.1043, 1996, pp. 1043\u20131065.", "P. S. Matusik et al, Neuroimaging Studies of the Neural Correlates of Heart Rate Variability: A Systematic Review, Journal of Clinical Medicine, Vol. 12, No. 3: 1016, DOI: 10.3390/jcm12031016, 2023.", "J. Happonen, Polar Sensor Logger, Google Play, https://play.google.com/store/apps/details?id=com.j_ware.polarsensorlogger, Accessed 21 July 2023.", "K. Ksi\u0105\u017cek et al, Polar HRV Data Analysis Library, https://github.com/iitis/Polar-HRV-data-analysis, Accessed 21 July 2023.", "S. Hattori et al, Effects of four atypical antipsychotics on autonomic nervous system activity in schizophrenia, Schizophrenia Research, Vol. 193, 2018, pp. 134-138."]}