Development of an open-source Python toolbox for heart rate variability (HRV) - Pedro Miguel Caridade Gomes (2019)
Heart Rate Variability (HRV) is a continuously growing research sector, for which an increasing number of new measures have been introduced over the recent decades. For this reason, many software tools have been developed to support researchers of this sector. However, closed-source tools prevent source code access to developers, while many open-source solutions face di erent issues, such as limited methods of HRV feature extraction, lack of technical documentation, or support for less mainstream programming languages. The goal of this work is to provide a fully open-source Python 2.7 toolbox named pyHRV for HRV research and application development. The implementation of this toolbox is supported by several open-source packages to compute Time Domain, Frequency Domain, and Nonlinear HRV parameters. As for the evaluation, HRV parameters have been computed from 50 Normal-to-Normal Interval (NNI) series of 5 minutes in duration and 50 NNI series of 60 minutes in duration using pyHRV and KUBIOS HRV, the reference software. The NNI series show no sign of pathological arrhythmias. A multilevel package architecture has been implemented for pyHRV, which gives the user the following computational options using a single line of code: (Level 1) computation of all HRV parameters, (Level 2) computation of domain-speci c parameters, or (Level 3) computation of individual parameters. In-code and support documentation is provided for support the implementation of pyHRV. Error catching capabilities (e.g. automatic second to millisecond conversion) have been implemented to reduce the occurrence of errors and increase the toolbox's robustness. pyHRV computes a total of 78 HRV parameters (23 Time Domain, 48 Frequency Domain, 7 Nonlinear), from which in a direct comparison with KUBIOS 12 have achieved identical results, with 38 parameters showing marginal di erences, and 26 showing signi cant di erences, thus, computing questionable results. Overall, pyHRV provides a reliable, versatile, robust and user-friendly toolbox for HRV researchers and application developers using the Python 2.7 programming language. pyHRV has been publicly released on the GitHub repository system.