Published July 21, 2023 | Version 1.0
Dataset Open

HRV-ACC: a dataset with R-R intervals and accelerometer data for the diagnosis of psychotic disorders using a Polar H10 wearable sensor

  • 1. Institute of Theoretical and Applied Informatics, Polish Academy of Sciences
  • 2. Department of Psychiatry, Faculty of Medical Sciences in Zabrze, Medical University of Silesia
  • 3. Psychiatric Department of the Multidisciplinary Hospital in Tarnowskie Góry
  • 4. Institute of Psychology, Humanitas University in Sosnowiec
  • 5. Department of Psychoprophylaxis, Faculty of Medical Sciences in Zabrze, Medical University of Silesia



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.


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.


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.


The structure of the dataset is as follows. One folder, called HRV_anonymized_data 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 treatment_X.csv, where X is the number of the person, while files related to the healthy controls are named control_Y.csv, where Y 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 raw_RR_{control,treatment}_N.png, where N 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:

Phone timestamp RR-interval [ms]
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.  
The second folder, called accelerometer_anonymized_data 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: treatment_X.csv and control_X.csv represent the data coming from the persons from the treatment and control group, respectively, while X 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:

Phone timestamp X [mg] Y [mg] Z [mg]
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 (PANSS.csv) for all patients participating in the measurement. The structure of this file is as follows:

no_of_person PANSS_P PANSS_N PANSS_G PANSS_total
1 8 13 22 43
2 11 7 18 36
3 14 30 44 88
4 18 13 27 58
... ... ... ... ..

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.


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 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 file after performing the sensitivity analysis. Furthermore, a detailed analysis for the one selected set of hyperparameters may be prepared (by setting sensitivity_analysis = False), 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 exclude_quetiapine = True because this medicine can have a strong impact on HRV [Hattori et al].

The accelerometer data processing may be performed using the 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 file.

The comparison of age distribution between the tested groups can be made by the histogram plotted with the use of the file.


The study was approved by the Bioethics Committee of the Medical University of Silesia, No.: BNW/NWN/0052/KB1/135/I/22/23.


Files (290.7 MB)

Name Size Download all
276.2 MB Preview Download
14.4 MB Preview Download
484 Bytes Preview Download
872 Bytes Preview Download

Additional details

Related works

Is described by
Preprint: 10.1101/2023.08.04.23293640 (Handle)


  • 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–1065.
  • 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,, Accessed 21 July 2023.
  • K. Książek et al, Polar HRV Data Analysis Library,, 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.