Approximate entropy

Also called ApEn, ApEn(m, r)

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.

Unit: nats

ApEn(m,r)=Φm(r)−Φm+1(r)\mathrm{ApEn}(m, r) = \Phi^{m}(r) - \Phi^{m+1}(r)

Approximate entropy is a measure of how regular a series of heartbeat intervals is: the average log-likelihood that runs of beats which are close for mm beats stay close for m+1m+1. It has no unit.

Why this measure exists

Steven Pincus proposed it in 1991 as a way to put a number on the complexity of a system from a relatively short, noisy record, a thousand points or so, at a time when the fashionable tool, the correlation dimension, needed far more data and could be fooled into announcing chaos. Applied to heart rhythm it ranks a steady, repeating series low and an unpredictable one high. Richman and Moorman showed in 2000 that it has two flaws: each run is counted as matching itself, which guarantees some matches and biases the result towards regularity, and the bias changes with the length of the record, so values from recordings of different lengths are inconsistent. Their sample entropy Sample entropy 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. More about Sample entropy was built to remove both, and it is the one to prefer.

The formula

ApEn(m,r)=Φm(r)−Φm+1(r),Φm(r)=1N−m+1∑iln⁡Cim(r)\mathrm{ApEn}(m, r) = \Phi^{m}(r) - \Phi^{m+1}(r),\qquad \Phi^{m}(r) = \frac{1}{N-m+1}\sum_{i}\ln C_i^{m}(r)

For every run of mm beats, count the share Cim(r)C_i^m(r) of all runs (itself included) that lie within rr of it, take the log, and average those logs to get Φm\Phi^m. Do the same for runs one beat longer, and subtract. mm is usually 2 and rr is 0.2 times the standard deviation of the intervals.

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 an approximate entropy of 1.02 next to a sample entropy of 1.67, from the same m=2m = 2 and rr = 5.7 ms. The gap between the two numbers is the self-match bias: the random preset scores 1.10 by ApEn against 2.35 by SampEn. The picture shows one template run, the band of tolerance around it, and the runs that match it.

What moves it

The same things as sample entropy: regular breathing lowers it, irregular breathing, 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 and noise raise it, and mm, rr and the record length all shift it. Because of the self-match bias it sits lower than sample entropy on the same data and falls further as the recording gets shorter.

When it misleads

Whenever recordings of different lengths are compared, and whenever it is read as a pure property of the heart rather than of the record, the parameters and the program. Shaffer and Ginsberg describe large values as low predictability and describe sample entropy as the less biased measure.

Where you will see it

Kubios HRV prints ApEn beside SampEn under its nonlinear measures, both with m=2m = 2 and r=0.2×SDNNr = 0.2 \times \mathrm{SDNN} by default. Older research papers report it; newer ones use sample entropy. Wearables do not show it.

Sources

  1. Approximate entropy as a measure of system complexity Proceedings of the National Academy of Sciences, 1991
  2. Physiological time-series analysis using approximate entropy and sample entropy American Journal of Physiology: Heart and Circulatory Physiology, 2000
  3. An overview of heart rate variability metrics and norms Frontiers in Public Health, 2017
  4. HRV analysis methods Kubios

All glossary terms