pyhctsa.operations.medical.hrv_classic

pyhctsa.operations.medical.hrv_classic(y)

Compute classic heart rate variability (HRV) statistics.

This function computes a variety of standard time-domain, frequency-domain, and geometric HRV measures from a time series of RR (or NN) intervals. The input is typically assumed to be in seconds.

The following categories of HRV features are included:

1. pNNx-style measures (pnnrel025, pnnrel05, pnnrel1, pnnrel2, pnnrel3) The proportion of successive differences whose magnitude exceeds 0.25, 0.5, 1, 2 and 3 times the robust standard deviation of the successive differences, sigD = median(|d - median(d)|)/0.6745 with d = diff(y) [1]. If sigD is at rounding-error level (<= 1e-10*std(y), i.e. more than half the increments are equal) the mean absolute deviation about the median times sqrt(pi/2) is used instead; if that is also negligible (all increments equal) all five are NaN. Thresholds relative to the spread of the increments are used because fixed thresholds (such as pNN5 to pNN40, in the units of the series) give proportions close to 1 for almost every z-scored series.

2. Frequency-domain measures The ratio of low- to high-frequency power (lfhf) and the percentages of total power in the very-low-, low- and high-frequency bands (vlf, lf, hf) of a Hann-windowed periodogram [2]. The periodogram is computed with fs = 2*pi, so the bands (VLF below 0.04, LF 0.04 to 0.15, HF 0.15 to 0.4) are in radians per sample, not in hertz.

3. Triangular histogram index A geometric measure of HRV based on the shape of the RR interval histogram.

4. Poincaré plot measures (SD1, SD2) Geometric descriptors of the Poincaré plot reflecting short- and long-term variability [3].

This implementation is adapted from original MATLAB code by Max A. Little (http://www.maxlittle.net/).

Port of hctsa’s MD_hrv_classic, Copyright (C) Ben D. Fulcher (GNU GPL, version 3 or later), heavily derived from code provided by Max A. Little.

References

Parameters:
y : array-like

Input time series of RR intervals, assumed to be in seconds.

Returns:

out – Dictionary containing various HRV features: pnnrel025, pnnrel05, pnnrel1, pnnrel2, pnnrel3 (pNNx-style statistics relative to a robust SD of the increments), frequency-domain power ratios (lfhf, vlf, lf, hf), triangular index (tri), and Poincaré measures (SD1, SD2).

Return type:

dict