# A Complete Pipeline for Heart Rate Extraction from Infant ECGs
## Appendix B Additional Dataset Information  
Dataset A served as the main dataset to develop the ECG-processing and early HR-processing sections of the pipeline (everything except the HR signal quality). It comprised 97 separate ECG signals of children aged 3-42 months (total recording time: 52 h 20 min, M\({}_{\text{duration}}\): 32 min, min: 11 min, max: 52 min, distribution of age and recording duration shown in Figure 3a). ECGs in Dataset A were collected using a Biosignalsplux device (PLUX Biosignals, Lisbon, Portugal) with a sampling rate of 500 Hz. ECGs were trimmed at the start and end prior to any analysis to exclude any non-recording periods (e.g., the trimmed periods were not included in the recording times above). There were 23 recording gaps in total in the dataset due to Bluetooth dropout from the Biosignalsplux device. These recordings occurred while infants engaged in free play in a semi-naturalistic setting in a lab (i.e., playroom). In Dataset A, R-peaks were hand-labelled, and any R-peaks where the ground truth was difficult to ascertain due to signal morphology or noise levels were counted for all ECGs. ECGs with more than 1 uncertain peak out of 400 were excluded from the analysis, leaving 97 ECGs. Note that, due to the exclusion criteria allowing for some level of peak-labelling uncertainty, this followed through into some uncertainties in the subsequent metrics calculated. The worst-case and average uncertainties for each subject in Dataset A were as follows. Specificity: worst case = \(-\)1.12 \(\times\) 10\({}^{-5}\); mean = \(-\)3.03 \(\times\) 10\({}^{-6}\). Sensitivity: worst case = \(-\)2.44 \(\times\) 10\({}^{-3}\); mean = \(-\)7.02 \(\times\) 10\({}^{-4}\). PPV: worst case = \(-\)2.43 \(\times\) 10\({}^{-3}\); mean = \(-\)7.01 \(\times\) 10\({}^{-4}\). These values are sufficiently small (even assuming the worst-case error for each individual subject in the dataset) so they do not affect any final conclusions. Dataset B served as a validation set by using a different sampling rate and sensor. Dataset B comprised 25 ECG signals from 19 infants aged 5-13 months (the ECGs from the six infants who supplied two recordings were taken at least 2 months apart). The total recording time was 3 h 34 min (M\({}_{\text{duration}}\): 8 min 36 s, min: 4 min 50 s, max: 17 min 31 s); the distribution of age and recording duration are shown in Figure 3b. This dataset has a higher signal quality than Dataset A (higher sampling frequency, less noise, and shorter duration), but is a smaller dataset. The ECGs were collected across 19 subjects, with 6 subjects providing double recordings taken at least 2 months apart. ECGs were collected using a Physio16 box for the Geodesic EEG System (GES) 400 device (Magstim EGI, USA) with a sampling rate of 1000 Hz. The ECGs were trimmed at the start and end to exclude any non-recording periods. These recordings were performed in a lab, and the infant remained mostly stationary throughout. There were a maximum of two uncertain peak labels in a subject (and only four uncertain labels across all subjects), which had a vanishingly minimal effect on subsequent calculations. Dataset C served as a test set for the HR signal quality. A total of 12 ECGs with a longer recording time and lower sampling rate (250 Hz) were gathered using the EgoActive body sensor (University of York, UK) [13], and were deliberately selected for a high noise levelfrom a larger selection of recordings. Children in these recordings were in the range of 5-11 months old (Figure 3c). These 12 naturalistic recordings were taken from a larger dataset recorded in the subject's home, with the device often containing periods of high movement and also being left on post-recording. Quality labelling was performed on a beat-by-beat basis on the calculated HR signal. Any areas of \"good\" signals shorter than 5 s were marked as bad to ensure a minimum length of heart rate.