The figure shows examples of beats from the MIT-BIH Arrhythmia database and how they were detected and corrected by our algorithm. The markers (little star, triangle, and square) and the associated labels (“N”, “V”, “a”) correspond to the database annotations and they mean, respectively: normal beat, premature ventricular contraction, and aberrated atrial premature beat. The “m”, “t”, and “r” letters next to some beats are the output of our detection algorithm (all other beats were detected as normal). The dashed blue line corresponds to the input series of R-R intervals while the black line is the output series produced by our correction algorithm (when the two coincide, only the black line is visible). On the left, subplot A shows examples of “m” and “t” beats and the remarkable ability of our algorithm to correct the R-R series and recover the underlying rhythmic structure. Two ectopic beats were not detected by any of the algorithms because they do not cause a sufficient deviation from the normal rhythm. Very likely they were labelled as ectopic based on their morphology (unavailable to our algorithm). The letter “t” marks the case of two ectopic beats in a row followed by a compensatory pause. This is a particularly challenging case, as it requires predicting the time of occurrence of two beats at once. Subplot B shows a rapid sequence of three ectopic beats and how they were detected and corrected by the algorithm. Subplot C shows a resetting ectopic beat that our algorithm correctly detects as such and flags for further correcting action. Finally, in subplot D, there is an example of a sudden physiologic change in autonomic control that might trigger a false detection. In fact, our previous algorithm presented in [14] as well as all three reference algorithm presented here detect one or more of the beats around t = 1470 s as arrhythmic, while the new algorithm presented here does not.