# A Complete Pipeline for Heart Rate Extraction from Infant ECGs
## 2 Materials and Results
### The ECG Pipeline
#### 2.2.2 Proposed ECG Preprocessing
The HeartPy, Neurokit2, Martinez, and Rodrigues results display the same characteristics as in Figures 4 and 5. The 15 Hz HPF approach improves on the EMD and all pre-existing methods in terms of worst-case labelling and median/IQR statistics for Dataset A. Specifically, the 15 Hz HPF median specificity, sensitivity, and PPV (0.999989, 0.9958, and 0.9975, respectively) outperformed the median results of all other methods, the closest pre-existing method being Neurokit2 (0.999975, 0.9863, 0.9938). If we interpret these median results on the average signal length (30.5 min, 4180 peaks), it means 13 fewer peaks were labelled incorrectly (10 vs. 23), 39 fewer peaks were missed (18 vs. 57), and only 0.25% of peaks that were identified were labelled incorrectly (vs. 0.72% for Neurokit2). While the EMD approach does improve on the other pre-existing approaches for Dataset A, for  
Figure 7: The Specificity, Sensitivity, and PPV (columns 1, 2, and 3, respectively) results shown as violin plots for a selection of frequency-preprocessing methods applied to (**a**) Dataset A and (**b**) Dataset B. In all subplots, the median is shown as a thick light-grey bar, and the IQR is shown as thin dark-grey bars. Each black dot represents one result. The lower-frequency bounds are shown on the \(y\)-axis, the upper-frequency bounds on the \(x\)-axis (with the right-most column of each subplot indicating no upper bound, i.e., an HPF). Results are all shown at a consistent scale; violin plots that extend to the edge of the graph may have results outside the visualised range. Dataset B, the EMD approach performs much worse overall, with a few worst-case labels performing very poorly. Figure 8: Violin plots for the best approaches for Dataset A. The median is shown as a thick light-grey bar, and the IQR is shown as thin dark-grey bars. Each black dot represents one result. The HeartPy, Neurokit2, Martinez, and Rodrigues results are the same as in Figure 4, but with a greater \(y\)-axis zoom. The EMD and 15 Hz HPF approaches are new ones evaluated in this paper. Figure 9: Violin plots for the best approaches for Dataset B. The median is shown as a thick light-grey bar, and the IQR is shown as thin dark-grey bars. Each black dot represents one result. The HeartPy, Neurokit2, Martinez, and Rodrigues results are the same as in Figure 5, but with a greater \(y\)-axis zoom. Average heart rate varies as a function of age [16], so a sub-analysis visualising the performance of the methods at different age boundaries on Dataset A is also carried out (Figure 10). Age-divisions were chosen as a balance between keeping a large enough cohort size for a valid analysis, and to recognise natural groupings that arose within the datasets (Figure 3). Dataset B's age-based analysis contained far fewer participants, especially when split into cohorts, and is included in Appendix C for completeness. The results for the 15 Hz HPF on Dataset A are the worst in the 8-10 month age range, but still outperform all other methods at all age ranges (Figure 10).