Heart Rate Fragmentation (HRF) is a dynamical biomarker of sinoatrial-cardioautonomic dysfunction, introduced by Costa and Goldberger to address limitations in traditional heart rate variability (HRV) analysis. While HRV conflates healthy respiratory sinus arrhythmia with pathologic high-frequency fluctuations, HRF specifically quantifies excess reversals in heart rate acceleration—a signature of impaired vagal control often seen with aging, cardiovascular disease, and cognitive decline [Costa et al., 2017].
This software is a Python/Tkinter re-implementation of the original AWK-based Heart Rate Fragmentation (HRF) analysis tool available on PhysioNet [Costa, 2024]. It faithfully reproduces the core metrics—PIP (Percentage of Inflection Points), PNNSS, and PNNLS—while adding modern usability features for research and validation.
Metrics have been validated against the original AWK code, showing identical results.
Access the full source code, validation scripts, and sample datasets:
https://github.com/attilaasghari/Heart-Rate-Fragmentation-HRF
Standalone executable for Windows (no Python required):
sha256:301d4944e2f0ca441ae1d401d2bb3823ba152f2add8d425d6e7013632b9656d9
These validation datasets are derived directly from the original PhysioNet Heart Rate Fragmentation software. They reproduce the timing, annotations, and variability of true ECG R-peak sequences used in the foundational HRF study. All metrics shown below were computed with this Python GUI implementation and verified to match the original AWK results.
Realistic R-peak sequence including one PVC beat. 61 records.
Processed records (NR): 61
Inflection Points (IP): 27
NN_total (denominator for PIP): 47
PIP = 27/47 = 57.447 %
Accelerative short count: 19
Accelerative long count: 16
N_acc_dec (short+long): 35
PNNSS = 19/35*100 = 54.286 %
PNNLS = 16/42*100 = 38.095 %
Sequence with one PVC and one outlier interval, simulating mild artifact or ectopic distortion.
Processed records (NR): 61
Inflection Points (IP): 28
NN_total (denominator for PIP): 46
PIP = 28/46 = 60.870 %
Accelerative short count: 20
Accelerative long count: 15
N_acc_dec (short+long): 35
PNNSS = 20/35*100 = 57.143 %
PNNLS = 15/43*100 = 34.884 %
Sequence with one PVC and two outliers, representing high fragmentation and low rhythm stability.
Processed records (NR): 61
Inflection Points (IP): 30
NN_total (denominator for PIP): 46
PIP = 30/46 = 65.217 %
Accelerative short count: 21
Accelerative long count: 15
N_acc_dec (short+long): 36
PNNSS = 21/36*100 = 58.333 %
PNNLS = 15/43*100 = 34.884 %
NN intervals are plotted with inflection points marked as red dashed lines, enabling rapid identification of fragmentation events.
Heart Rate Fragmentation Analyzer in action: metrics computed from timeseries_1PVC.txt with NN interval plot showing inflection points (red dashed lines).