## 2 Materials and Methods
### Visualization and Scoring Methodology  
An application tool, the Uterine Inspector (Figure 3) was implemented to simplify the scoring operation. This tool is part of the Uterine Explorer Project [5]. The detected and delineated contractions are represented in all the recorded EHG channels, using the five selected energy methods, in different plots. The extra entries shown in the tool interface represent additional EHG events that will be processed in a future work. This tool turned out to play an important role in the process of the expert visual evaluation of the presented algorithms. Table 1 presents more detailed information about the Uterine Inspector interface. Figure 3: Uterine Inspector application for contraction database management, visualization, and evaluation. This tool was used for the expert scoring of contraction detection. Table 1 provides details about the entries shown in the interface. Figure 4 shows an example of the contraction detection algorithm for bipolar channel 4-13. From top to bottom (energy estimation methods): wavelet, Teager, RMS, squared RMS, and Hilbert. It is clear that different energy estimation methods produced dissimilar contraction delineation bounds and misdetections. For non-stationary signals such as EHG signals, the delineation accuracy is prone to have a certain degree of boundary ambiguity. Unlike the well-characterized electrocardiogram waveform, for which defined scoring rules exist, as far as components characterization and delineation are concerned, the EHG basal activity randomness makes the contraction delineation assessment a difficult task that scorers must face in order to reduce subjectivity. The use of the TOCO as a score reference was excluded in this methodology based on the following considerations: (1) the existing mismatches between TOCO amplitude and the strength of the uterine contractions produces a poor accuracy of the onset and offset of the contractile events, particularly for subjects with high BMI; (2) it has been reported [14] that the sensitivity, positive predictive value, and false positive rate for the individual contractions using TOCO and EHG relative to the IUP are: 54.0%, 84.4%, 15.6% and 94.2%, 87.6%, 12.4%, respectively. This prompted the authors of this work to justify the option of not using the TOCO as a scoring reference. It was considered that, as far as contraction onset and offset delineation are concerned, the inaccuracy of the TOCO would surpass the effect of the relative randomness of the basal uterine activity in the EHG. \begin{table}
\begin{tabular}{l l} \hline \hline  & **Detection Method in the Respective EHG Channel** \\ \hline Wavelet\_cont & Number of contractions detected with wavelet energy method \\ Teager\_cont & Number of contractions detected with Teager method \\ RMS\_cont & Number of contractions detected with RMS method \\ RMS\_Squared\_cont & Number of contractions detected with squared RMS method \\ Hilbert\_Envelope\_cont & Number of contractions detected with Hilbert envelope method \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Interpretation of the Uterine Inspector output table (Figure 3). Figure 4: Example of the contraction detection algorithm for channel 4-13. Red: EHG signal; Blue line: energy estimation; Green: contraction delineation. From top to bottom (energy estimation methods): wavelet, Teager, RMS, squared RMS, and Hilbert. The vertical axis is represented in arbitrary units. It is often observed that contractile activity in the EHG is not present in the TOCO due to the limited sensitivity of its mechanical transducer. Surely, the IUP would be the gold standard reference method; however, as previously mentioned it is only used in selected labor cases after membrane rupture. The option of using an automatic scoring algorithm is currently unrealistic, taking in account that no standards exist, and the relative energy method accuracy may be still a matter of debate due to a lack of clear benchmarks.