# A Complete Pipeline for Heart Rate Extraction from Infant ECGs
## 2 Materials and Results
### The ECG Pipeline
#### 2.2.1 Existing ECG Approaches
\begin{table}
\begin{tabular}{c c} \hline \hline
**ECG Method** & **Method Description** \\ \hline \multirow{4}{*}{HeartPy [36, 42, 43]} & Designed for noisy data. Preprocessing uses baseline wander removal, a 0.05 Hz notch filter, and a 0.003–20 Hz bandpass filter. Peak detection uses an adaptive threshold, then outlier detection and rejection. HeartPy user customisation is used to raise the maximum allowed HR to 220 bpm. \\ \hline \multirow{4}{*}{Neurokit2 [44]} & Preprocessing uses only a 0.5 Hz HPF and a 50 Hz notch filter. Gradients are used to detect QRS complexes, then an R-peak is detected within each QRS. \\ \hline \multirow{4}{*}{Pan-Tompkins [45]} & Preprocessing uses a 5–15 Hz BPF before taking a derivative, squaring, and integrating with a moving window to isolate the R-peak, which is detected via a series of thresholds. \\ \hline \multirow{4}{*}{[PERSON] [33]} & Adaptation of the Pan–Tompkins method that uses an 8–16 Hz BPF rectification instead of squaring, and also a smaller integration window. \\ \hline \multirow{4}{*}{[PERSON] [29]} & Uses two self-adjusting algorithms to detect the current beat and the interval between beats, self-adjusting for different sampling frequencies. It is particularly designed for multi-lead analysis. \\ \hline \multirow{2}{*}{[PERSON] \& [PERSON] [46, 47]} & Uses a 48–52 Hz notch filter differentiates the signal, passes it through an adaptive LPF, and then uses Christov-inspired adaptive threshold analysis to detect the peak. \\ \hline \multirow{4}{*}{[PERSON] [35]} & Resamples the signal to 80 Hz; uses Daubechies 3 wavelets for stationary wavelet transforms. The signal is squared and a moving window average enhances the R-peaks, which are detected using threshold-based peak detection. \\ \hline \multirow{2}{*}{[PERSON] [32]} & R-peak detection derived from Pan–Tompkins. A sliding window is used to detect a liberal initial R-peak list before culling the list. \\ \hline \multirow{2}{*}{[PERSON] [37, 48]} & Aims to identify multiple ECG complexes. Uses a quadratic spline wavelet transform to identify the QRS peak. \\ \hline \multirow{2}{*}{[PERSON] [28]} & Uses an 8–20 Hz BPF along with moving window integration and thresholding to detect the R-peaks. \\ \hline \multirow{2}{*}{[PERSON] [31]} & Uses a 16 Hz LPF, a non-linear scaling factor to enhance the QRS complex and reduce low-frequency noise, and then adaptive thresholds to determine the onset and duration of the QRS complex. \\ \hline \multirow{4}{*}{Rodrigues [30]} & Uses a double derivative, square, and moving window integration in preprocessing to enhance the QRS complex. A finite-state machine enhances the R-peak position [49], with an adaptive exponential decaying threshold for R-peak detection [50]. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: A guide to the pre-existing ECG pipelines tested in this study. nator. The sensitivity is also important but can be falsely inflated by a method identifying many false peaks, and so must be considered in the context of the other two metrics. These methods all require the precise detection of peak location. Specificity = (True Negatives)/(True Negatives + False Positives) (2) Sensitivity = (True Positives)/(True Positives + False Negatives) (3) Positive Predictive Value = (True Positives)/(True Positives + False Positives)  
The distributions of the results are shown in violin plots, with black dots representing each individual result. The median and interquartile ranges (IQRs) are also shown as dotted lines. Collectively, this visualisation allows for the evaluation of both the summative statistics and the general metric distribution. In cases where the results of some methods fall far beyond the range of the best-performing methods, visualisations are truncated to present a clearer comparison between the core performances. For each method, conventional preprocessing was applied, although a local peak correction was used after labelling to allow a fair comparison between the different methods.