| Literature DB >> 35880142 |
Abstract
NeuroKit2 is a Python Toolbox for Neurophysiological Signal Processing. The presented method is an adaptation of NeuroKit2 to simplify and automate computation of the various mathematical estimates of heart rate variability (HRV) or similar time series. By default, the present approach accepts as input electrocardiogram's R-R intervals (RRIs) or peak times, i.e., timestamp of each consecutive R peak, but the RRIs or peak times can also stem from other biosensors such as photoplethysmography (PPGs) or represent more general kinds of biological or non-biological time series oscillations. The data may be derived from a single or several sources such as conventional univariate heart rate time series or intermittently weakly coupled fetal and maternal heart rate data. The method describes preprocessing and computation of an output of 124 HRV measures including measures with a dynamic, time-series-specific optimal time delay-based complexity estimation with a user-definable time window length. I also provide an additional layer of HRV estimation looking at the temporal fluctuations of the HRV estimates themselves, an approach not yet widely used in the field, yet showing promise (doi: 10.3389/fphys.2017.01112). To demonstrate the application of the methodology, I present an approach to studying the dynamic relationships between sleep state architecture and multi-dimensional HRV metrics in 31 subjects. NeuroKit2's documentation is extensive. Here, I attempted to simplify things summarizing all you need to produce the most extensive HRV estimation output available to date as open source and all in one place. The presented Jupyter notebooks allow the user to run HRV analyses quickly and at scale on univariate or multivariate time-series data. I gratefully acknowledge the excellent support from the NeuroKit team.•Univariate or multivariate time series input; ingestion, preprocessing, and computation of 124 HRV metrics.•Estimation of intra- and inter-individual higher order temporal fluctuations of HRV metrics.•Application to a sleep dataset recorded using Apple Watch and expert sleep labeling.Entities:
Keywords: Biological oscillations; Heart rate variability; Higher order time series property estimation; Reproducible, tunable HRV computation
Year: 2022 PMID: 35880142 PMCID: PMC9307944 DOI: 10.1016/j.mex.2022.101782
Source DB: PubMed Journal: MethodsX ISSN: 2215-0161
Heart rate variability (HRV) metrics computed in the present adaptation of the NeuroKit2 Python toolbox [14,15].
| Time domain | RMSSD | The square root of the mean of the sum of successive differences between adjacent RR intervals. It is equivalent (although on another scale) to SD1, and therefore it is redundant to report correlations with both |
| MeanNN | The mean of the RR intervals. | |
| SDNN | The standard deviation of the RR intervals. | |
| SDSD | The standard deviation of the successive differences between RR intervals. | |
| CVNN | The standard deviation of the RR intervals (SDNN) divided by the mean of the RR intervals (MeanNN). | |
| CVSD | The root mean square of the sum of successive differences (RMSSD) divided by the mean of the RR intervals (MeanNN). | |
| MedianNN | The median of the absolute values of the successive differences between RR intervals. | |
| MadNN | The median absolute deviation of the RR intervals. | |
| MCVNN | The median absolute deviation of the RR intervals (MadNN) divided by the median of the absolute differences of their successive differences (MedianNN). | |
| IQRNN | The interquartile range (IQR) of the RR intervals. | |
| pNN50 | The proportion of RR intervals greater than 50ms, out of the total number of RR intervals. | |
| pNN20 | The proportion of RR intervals greater than 20ms, out of the total number of RR intervals. | |
| TINN | A geometrical parameter of the HRV, or more specifically, the baseline width of the RR intervals distribution obtained by triangular interpolation, where the error of least squares determines the triangle. It is an approximation of the RR interval distribution. | |
| HTI | The HRV triangular index, measuring the total number of RR intervals divided by the height of the RR intervals histogram. | |
| SDANN1 | The standard deviation of average RR intervals extracted from n-minute segments of time series data (1, 2 and 5 by default). | |
| SDANN2 | ||
| SDNNI2 | The mean of the standard deviations of RR intervals extracted from n-minute segments of time series data (1, 2 and 5 by default). | |
| SDANN5 | ||
| SDNNI5 | ||
| MCVNN | MadNN/MedianNN (normalized). | |
| Prc20NN | ||
| Prc80NN | ||
| MinNN | ||
| MaxNN | ||
| Frequency domain | ULF | Ultra-low frequency band spectral power |
| VLF | Very-low frequency band spectral power | |
| LF | Low frequency band spectral power | |
| HF | High frequency band spectral power | |
| VHF | Very high frequency band spectral power | |
| LFHF | LF/HF ratio | |
| LFn | LF normalized | |
| HFn | HF normalized | |
| LnHF | Natural logarithm transformed HF | |
| Recurrence quantification | RecurrenceRate | Recurrence rate (RR): Proportion of points that are labelled as recurrences. Depends on the radius r. |
| Determinism | Determinism (DET): Proportion of recurrence points which form diagonal lines. Indicates autocorrelation. | |
| DeteRec | Ratio Determinism / Recurrence rate | |
| L | Average diagonal line length (L): Average duration that a system is staying in the same state. | |
| Divergence | Divergence (DIV). | |
| LEn | Entropy diagonal lines. | |
| Laminarity | Laminarity (LAM): Proportion of recurrence points which form vertical lines. Indicates the number of laminar phases (intermittency) | |
| TrappingTime | Trapping Time (TT) - Ratio Determinism / Recurrence rate (DET_RR) | |
| VMax | Longest vertical line length | |
| VEn | Entropy vertical lines | |
| W | Average white vertical line length. | |
| WMax | Longest white vertical line length. | |
| WEn | Entropy white vertical lines. | |
| Characteristics of the Poincaré Plot Geometry | SD1 | This is a measure of the spread of RR intervals on the Poincaré plot perpendicular to the line of identity. It is an index of short-term RR interval fluctuations, i.e., beat-to-beat variability. It is equivalent (although on another scale) to RMSSD, and therefore it is redundant to report correlations with both |
| SD2 | SD2 is a measure of the spread of RR intervals on the Poincaré plot along the line of identity. It is an index of long-term RR interval fluctuations. | |
| SD1SD2 | the ratio between short and long term fluctuations of the RR intervals (SD1 divided by SD2). | |
| S | Area of ellipse described by SD1 and SD2 (pi * SD1 * SD2). It is proportional to SD1SD2. | |
| CSI | The Cardiac Sympathetic Index, calculated by dividing the longitudinal variability of the Poincaré plot (4*SD2) by its transverse variability (4*SD1) | |
| CVI | The Cardiac Vagal Index, equal to the logarithm of the product of longitudinal (4*SD2) and transverse variability (4*SD1) | |
| CSI_Modified | The modified CSI obtained by dividing the square of the longitudinal variability by its transverse variability | |
| Indices of Heart Rate Fragmentation | PIP | Percentage of inflection points of the RR intervals series. |
| IALS | Inverse of the average length of the acceleration/deceleration segments. | |
| PSS | Percentage of short segments. | |
| PAS | Percentage of NN intervals in alternation segments. | |
| Indices of Heart Rate Asymmetry (HRA), i.e., asymmetry of the Poincaré plot | GI | Guzik's Index, defined as the distance of points above line of identity (LI) to LI divided by the distance of all points in Poincaré plot to LI except those that are located on LI. |
| SI | Slope Index, defined as the phase angle of points above LI divided by the phase angle of all points in Poincaré plot except those that are located on LI. | |
| AI | Area Index, defined as the cumulative area of the sectors corresponding to the points that are located above LI divided by the cumulative area of sectors corresponding to all points in the Poincaré plot except those that are located on LI. | |
| PI | Porta's Index, defined as the number of points below LI divided by the total number of points in Poincaré plot except those that are located on LI. | |
| C1d | The contributions of heart rate decelerations and accelerations to short-term HRV, respectively | |
| C1a | ||
| SD1d | Short-term variance of contributions of decelerations (prolongations of RR intervals) and accelerations (shortenings of RR intervals), respectively | |
| SD1a | ||
| C2d | The contributions of heart rate decelerations and accelerations to long-term HRV, respectively | |
| C2a | ||
| SD2d | SD2d and SD2a: long-term variance of contributions of decelerations (prolongations of RR intervals) and accelerations (shortenings of RR intervals), respectively | |
| SD2a | ||
| Cd | The total contributions of heart rate decelerations and accelerations to HRV. | |
| Ca | ||
| SDNNd | Total variance of contributions of decelerations (prolongations of RR intervals) and accelerations (shortenings of RR intervals), respectively | |
| SDNNa | ||
| Indices of Complexity | ApEn | The approximate entropy measure of HRV. |
| SampEn | The sample entropy measure of HRV. | |
| MSE | The multiscale entropy measure of HR. | |
| CMSE | The composite multiscale entropy measure of HRV. | |
| RCMSE | The refined composite multiscale entropy measure of HRV. | |
| DFA | The detrended fluctuation analysis of the HR signal. | |
| CorrDim | The correlation dimension of the HR signal. | |
| optimal time delay | This metric, in seconds, provides time delay for optimal reconstruction of the underlying dynamic process | |
| FuzzEn | Fuzzy Entropy | |
| FuzzEnMSE | FuzzEn version of the multiscale entropy (MSE). | |
| FuzzEnRCMSE | FuzzEn version of the refined composite multiscale entropy (RCMSE). | |
| cApEn | Corrected version of ApEn | |
| CREn | Cumulative residual entropy is an alternative to the Shannon differential entropy with several advantageous properties, such as non-negativity. | |
| DiffEn | Differential entropy, also referred to as continuous entropy) started as a (failed) attempt by Shannon to extend Shannon entropy. However, differential entropy presents some issues too, such as that it can be negative even for simple distributions (such as the uniform distribution). | |
| FI | Fisher information. | |
| Hjorth | Hjorth Parameters are indicators of statistical properties used in signal processing in the time domain introduced by Hjorth (1970) | |
| Hurst | The hurst exponent is a measure of the "long-term memory" of a time series. It can be used to determine whether the time series is more, less, or equally likely to increase if it has increased in previous steps | |
| KFD | The Katz's Fractal Dimension is based on euclidean distances between successive points in the signal which are summed and averaged, and the maximum distance between the starting and any other point in the sample | |
| LZC | The Lempel-Ziv complexity quantifies the regularity of the signal by scanning symbolic sequences for new patterns, increasing the complexity count every time a new sequence is detected. Regular signals have a lower number of distinct patterns and thus have low LZC whereas irregular signals are characterized by a high LZC. While often being interpreted as a complexity measure, LZC was originally proposed to reflect randomness | |
| MSPEn | Multiscale permutation entropy. | |
| NLD | Fractal dimension (FD) of signal epochs via Normalized Length Density. | |
| PEn | Permutation entropy. | |
| PFD | Petrosian fractal dimension: a fast method to estimate the fractal dimension of a finite sequence, which converts the data to binary sequence before estimating the fractal dimension from time series. Several variations of the algorithm exist (e.g., ‘A’, ‘B’, ‘C’ or ‘D’), primarily differing in the way the binary sequence is created. | |
| PLZC | Permutation Lempel-Ziv Complexity (PLZC) combines permutation and LZC. A finite sequence of symbols is first generated (numbers of types of symbols = dimension!) and LZC is computed over the symbol series. | |
| PSDslope | Fractal dimension via Power Spectral Density (PSD) slope | |
| It first transforms the time series into the frequency domain and breaks down the signal into sine and cosine waves of a particular amplitude that together “add-up” to represent the original signal. If there is a systematic relationship between the frequencies in the signal and the power of those frequencies, this will reveal itself in log-log coordinates as a linear relationship. The slope of the best fitting line is taken as an estimate of the fractal scaling exponent and can be converted to an estimate of the fractal dimension. A slope of 0 is consistent with white noise, and a slope of less than 0 but greater than –1, is consistent with pink noise, i.e., 1/f noise. Spectral slopes as steep as −2 indicate fractional Brownian motion, the epitome of random walk processes. | ||
| RR | Relative Roughness is a ratio of local variance (autocovariance at lag-1) to global variance (autocovariance at lag-0) that can be used to classify different 'noises' [ | |
| SDA | Standardized Dispersion Analysis | |
| SFD | Sevcik fractal dimension | |
| SVDEn | Singular Value Decomposition (SVD) Entropy. | |
| SpEn | Spectral entropy treats the signal's normalized power distribution in the frequency domain as a probability distribution and calculates the Shannon entropy of it. | |
| WPEn | Weighted PE. | |
| ShanEn | Entropy is a measure of unpredictability of the state, or equivalently, of its average information content. Shannon entropy is one of the first and most basic measure of entropy and a foundational concept of information theory. Shannon's entropy quantifies the amount of information in a variable. | |
| HFD | The Higuchi's Fractal Dimension of the HR signal | |
| Detrended Fluctuation Analysis (DFA) and Multifractal DFA | DFA_alpha1 | The monofractal detrended fluctuation analysis of the HR signal corresponding to short-term correlations |
| MFDFA_alpha1_Width | The multifractal detrended fluctuation analysis of the HR signal corresponding to short-term correlations; the range of singularity exponents, corresponding to the width of the singularity spectrum. | |
| MFDFA_alpha1_Peak | ||
| MFDFA_alpha1_Mean | Multifractal DFA; the mean of singularity exponents. | |
| MFDFA_alpha1_Max | ||
| MFDFA_alpha1_Delta | ||
| MFDFA_alpha1_Asymmetry | ||
| MFDFA_alpha1_Fluctuation | ||
| MFDFA_alpha1_Increment | ||
| DFA_alpha2 | The monofractal detrended fluctuation analysis of the HR signal corresponding to long-term correlations | |
| MFDFA_alpha2_Width | The multifractal detrended fluctuation analysis of the HR signal corresponding to long-term correlations the range of singularity exponents, corresponding to the width of the singularity spectrum. | |
| MFDFA_alpha2_Peak | ||
| MFDFA_alpha2_Mean | Multifractal DFA; the mean of singularity exponents | |
| MFDFA_alpha2_Max | ||
| MFDFA_alpha2_Delta | ||
| MFDFA_alpha2_Asymmetry | ||
| MFDFA_alpha2_Fluctuation | ||
| MFDFA_alpha2_Increment | ||
| Quality control | segment duration, s | Logs the length of RRI period used for HRV each computation. |
Fig. 1Example of the temporal relationship between Sample Entropy of HRV and sleep states computed from Apple Watch [46].
Fig. 2Spearman correlations between the durations of N3 stage of NREM sleep and HRV complexity metric SampEn as well as the linear time domain metric RMSSD. As a representative metric of higher-order variability, the temporal variability, gauged as coefficient of variation (CV), of these two HRV metrics is also considered [44,47].
Fig. 3The variability of RMSSD correlates with N3 NREM duration.
Fig. 4Correlations between sleep state durations and HRV metrics. TOP: all metrics and sleep states are shown for which Spearman R values were found where p < 0.05. BOTTOM: A selective zoom on the strong correlations. See Table 1 for HRV metrics legend. The resulting dynamic visualization of correlations between HRV metrics and sleep states with Plotly can be viewed here: https://plotly.com/~mfrasch/5/import-pandas-as-pd-import-plotlyexpres/.
| Subject Area | Bioinformatics |
| More specific subject area | |
| Method name | |
| Name and reference of original method | |
| Resource availability |