Sample entropy

Also called SampEn, SampEn(m, r)

How unpredictable the heartbeat series is: minus the log of the chance that runs of beats that match also match one beat longer. Near 0 is a repeating pattern; 2 or more is close to random.

Unit: nats

SampEn(m,r)=−ln⁡AB\mathrm{SampEn}(m, r) = -\ln\frac{A}{B}

Sample entropy is a number that says how unpredictable the next beat is given the last few: minus the natural log of the chance that two runs of mm beats that match within a tolerance rr still match when both are one beat longer. It has no unit.

Why this measure exists

Richman and Moorman introduced it in 2000 to fix two faults in the older approximate entropy Approximate entropy The older cousin of sample entropy, with no unit: a regularity measure that counts each run of beats as matching itself, which biases it towards low values on short recordings. More about Approximate entropy : that measure counted each run as matching itself, which biased it towards regularity, and its value drifted with the length of the record. Sample entropy drops the self-matches and counts both sets of matches over the same runs, so it tracks the theoretical values on random data more closely and can be computed from short records, under 200 beats. The idea behind both is the same. A repeating series is predictable, so almost every match over mm beats survives one more beat and the entropy is near 0; a random series is unpredictable, so few survive and the entropy is high. Sassi and colleagues’ 2015 statement groups it with the entropy and regularity measures that have deepened understanding of the signal without yet adding much in the clinic.

The formula

SampEn(m,r)=−ln⁡AB\mathrm{SampEn}(m, r) = -\ln\frac{A}{B}

Pick a run length mm (usually 2 beats) and a tolerance rr (usually 0.2 times the standard deviation of the intervals). BB is the number of pairs of different runs of mm beats whose every beat lies within rr of the other run’s; AA is the number of those pairs that still match when both runs are extended to m+1m+1 beats. Take the natural log of A/BA/B and change the sign. Values are in nats, the unit of a natural log, though most programs print them bare.

Worked example

How predictable is the next beat?

Five minutes of the teaching recording

SampEn
1.67
ApEn
1.02
Tolerance r
5.7 ms
m matches
13
m+1 matches
1

Rested, m = 2, r = 0.20 × SD = 5.7 ms. The highlighted run of 2 beats matches 13 other runs within 5.7 ms; 1 of them still matches when both runs are one beat longer. Counted over every run in the recording, sample entropy is 1.67: the breathing rhythm makes the next beat partly predictable.

The controls work when JavaScript is on.

The first 64 beats of the teaching recording. One run of m beats is highlighted with a band of ±r around each beat; every other run that stays inside the band is a match, and the darker boxes are matches that still hold one beat longer. Sample entropy (SampEn) is minus the log of the share of matches that survive, counted over the whole recording; approximate entropy (ApEn) is its older cousin. Change m and r, or switch to a periodic or a random series.

A line chart of 64 heartbeat intervals in order. A highlighted box marks a template run of m beats with a tolerance band of plus or minus r milliseconds around each of its beats; lighter boxes mark other runs of m beats that match the template within the band, and darker boxes those that still match when both runs are one beat longer. Readouts give sample entropy, approximate entropy, the tolerance in milliseconds, and the two match counts, followed by a sentence explaining them. Two sliders set m (1 to 4 beats) and r (0.1 to 0.6 times the standard deviation); three buttons choose a periodic series, the rested recording or random beats.

Five minutes of the teaching recording give a sample entropy of 1.67 with m=2m = 2 and rr = 5.7 ms. The highlighted run of two beats matches 13 other runs, and 1 of them still match one beat longer. A perfectly periodic series scores 0.01; random beats of the same spread score 2.35. Widen rr and almost everything matches, so the number falls whatever the series.

What moves it

Breathing: a steady breathing rhythm makes the beats partly predictable and lowers it; irregular breathing raises it. Ectopic beats Ectopic beat A heartbeat that starts outside the heart's normal pacemaker and usually comes early. Ectopic beats are common, but they distort HRV unless removed or corrected. More about Ectopic beat and noise raise it. The choice of mm and rr moves it a great deal, so Kubios defaults to m=2m = 2 and r=0.2×SDNNr = 0.2 \times \mathrm{SDNN}. Sassi and colleagues report that entropy measures fall with age and during head-up tilt, and Shaffer and Ginsberg relate it to regularity and complexity.

When it misleads

When two programs use different mm, rr or lengths: the numbers are not comparable. In very regular series (paced breathing) it reads near 0 by construction, and when no run matches over m+1m+1 beats it is undefined, which a program may print as a very large number. It also needs a clean series, since artifacts Artifact An error in a heartbeat recording, such as a missed, extra or mistimed beat, often caused by movement or poor sensor contact. Artifacts can badly distort HRV numbers. More about Artifact add irregularity that looks like complexity.

Where you will see it

Kubios HRV prints SampEn (with ApEn, DFA DFA α1 The short-term scaling exponent of detrended fluctuation analysis. Near 1 the beats have memory at every scale; near 0.5 they behave like noise. α2 is the same slope over longer stretches. More about DFA α1 , correlation dimension, recurrence measures and multiscale entropy) under its nonlinear measures. Research papers use it, for example on ageing and in newborns, where it has predicted sepsis in premature babies; wearables do not show it. What are nonlinear HRV measures and do I need them? weighs up whether any of this matters for a reader with a wearable.

Sources

  1. Physiological time-series analysis using approximate entropy and sample entropy American Journal of Physiology: Heart and Circulatory Physiology, 2000
  2. Advances in heart rate variability signal analysis: joint position statement by the e-Cardiology ESC Working Group and the European Heart Rhythm Association co-endorsed by the Asia Pacific Heart Rhythm Society Europace, 2015
  3. An overview of heart rate variability metrics and norms Frontiers in Public Health, 2017
  4. HRV analysis methods Kubios

All glossary terms