A Fetal Heart Rate Morphological Analysis Toolbox for MATLAB

—These The fetal heart rate (FHR) is a screening signal for preventing fetal hypoxia during labor. When experts analyze this signal, they have to position a baseline and then identify decelerations and accelerations. These steps can potentially be automated and made more objective by signal processing analysis. Various methods have been described in the literature but there are no open-source programs for performing these steps. The MATLAB toolbox presented here comprises a standard signal pre-processing function, 11 re-coded literature methods for fetal heart rate analysis, a signal viewer (enabling annotation by an expert) and an evaluation procedure with various criteria measuring intrarater agreement.


INTRODUCTION
HE fetal heart rate (FHR) is a key parameter for monitoring fetal well-being during pregnancy, labor, and delivery.A good interpretation of FHR is important to reduce unnecessary cesarean section and operative delivery rate while reducing risk of fetal acidosis.Analysis of the FHR first consists in determining several elementary parameters: the baseline (i.e. the mean level of the most horizontal, least oscillatory FHR segments [1]), the variability (i.e.variations in amplitude during stable periods, in the absence of fetal movement or uterine contraction), acceleration episodes (i.e. an abrupt increase in the FHR of more than 15 beats per minute (bpm), and lasting more than 15 seconds), deceleration episodes (i.e. a temporary decrease in the FHR of more than 15 bpm, and lasting more than 15 seconds), and sinusoidal patterns [1].According to the International Federation of Gynecology and Obstetrics (FIGO) classification [1], an FHR recording is said to be normal if (i) the baseline ranges from 110 to 160 bpm, (ii) the variability ranges from 6 to 25 bpm, and (iii) there are accelerations but no deceleration (an acceleration is considered to be a reassuring feature of the FHR but a deceleration is not.) The interpretation of FHR signals is subject to considerable inter-observer and intra-observer variability [2], as a result of sometimes imprecise assessment criteria and a lack of practical training.Automatic analysis could remove this variability and thus improve the prediction of the risk of hypoxia during the delivery.When attempting to analyze the FHR automatically, the main problem is computation of the baseline against which all the other parameters are determined.Trying to compute the baseline creates a circular definition: acceleration/deceleration (A/D) are defined as periods that are 15 bpm above or below the baseline, whereas the baseline is defined as the mean signal after A/D episodes have been excluded from the data.
Several researchers have developed automatic analysis methods (AAMs) [3][4][5][6][7][8][9][10][11][12][13][14].Unfortunately, there are almost no open-source programmed versions of any algorithms or standard tools for displaying FHR analysis and measuring each method effectiveness.Furthermore, researchers have to perform their own evaluation, since there is no common database within which various methods can be compared and there is no common evaluation criteria.Here, we describe a MATLAB toolbox which gives some tools to tests, display and evaluates the various method of literature as well as future method.11 methods of literature have been re-programmed in this way.This work is related to two previous publications [15,16].Sample data are also described in [17].All the data and source code are distributed under a GPL (General Public Licence) (version 3) and are available at [http://utsb.univcatholille.fr/fhr-review].

Software architecture
The toolbox has been designed as a modular software package.It includes a graphical user interface (GUI) (to be launched with fhrmorpho), which allows its use as a standalone tool.The user selects the FHR file to be opened and the AAM; the interface then displays the corresponding baseline and A/D.An expert can also use the interface to annotate and analyze the FHR recording by drawing a baseline and selecting the beginning and end of each A/D.Indices representing the level of discordance between the AAM and the expert can then be displayed (see section 2.2.5).
The toolbox includes a dataset of 156 FHR recordings (described in [17]).Sixty-six of those form a training dataset accompanied by an expert consensus analysis.The other 90 recordings correspond to an evaluation dataset for which the Based on morphological filters; an opening filter removes accelerations and a closing filter removes decelerations.
Only described for acceleration (presumably the same for deceleration) aamhouze Houzé et al. (1990) [5] Based on a series of logic rules applied to various signal derivatives, followed by a smoothing step.
No (not described clearly enough to be reprogrammed) Unstable periods (with a derivative above a cut-off) are removed, and the baseline is calculated after smoothing the remaining signal.

Yes aamlu
Lu and Wei (2012) [7] A method using empirical mode decomposition; periods exhibiting significant differences between two successive local FHR minima are excluded from the baseline computation.
No (probably standard thresholding) The baseline is set to the FHR level that occurs most often within a 10 bpm-wide bin.
No (not described clearly enough to be reprogrammed) aammantel

Mantel et al. (1990) [9][10]
The method uses the mode or another local maximum of the FHR histogram to obtain an initial baseline.The final baseline is obtained by progressively trimming the first baseline (based on Dawes et al.'s [19] method).This method was developed for antepartum recording.
(1997) [11] This method computes a primary mode and a secondary mode; the two modes can be switched, depending on continuity and frequency criteria.The toolbox can also be called through a command line interface in MATLAB; it can therefore interact with other toolboxes or software.

Opening an FHR file
Electronic fetal monitors (cardiotocographs) record the signal from a Doppler ultrasound probe or an ECG probe located on the fetus scalp.This raw signal is used to determine the instantaneous fetal heart rate which is sent to a central computer via an RS232 protocol.We have developed a means of capturing and recording these signals [18].All signals are sampled and stored at 4 Hz, with a precision of 0.25 bpm for the FHR and 0.5 mmHg for the tocograph signal (TOCO).Since there is no standard FHR file format, we design our own (which can be opened with the fhropen function) [17]: (i) A uint32 serves as the UNIX timestamp for the beginning of the recording.(ii) For each sample, (ii.a) a uint16 encodes the FHR from the first sensor (multiplied by 4), (ii.b) a uint16 encodes the FHR signal from the second sensor (in case of twins or when both Doppler and scalp ECG sensors are present) (x4), (ii.c) a uint8 encodes the tocograph signal (x2), and (ii.d) a uint8 for signal quality (0: no signal, 1: low-quality signal, 2: high-quality signal).The FHR signal is set to 0 when it is missing.

Pre-processing
As described in [3], standard pre-processing can be performed using the fhrpreprocess function: aberrant samples (with a difference of more than 25 bpm between two successive samples) are excluded.Periods of missing data that lasted less than 30 s were completed by linear interpolation.

The automated method analysis
Eleven AAMs from the literature have been reprogrammed; a short description of the main idea behind each AAM is given in Table 1.
Each AAM provides a specific baseline algorithm, and some of them provide an algorithm for A/D detection (as described in the right-hand column of Table 1).We have also added a standard method for A/D detection (simpleaddetection) which can be applied to all baseline methods.This standard method simply consists in defining A/D as periods during which the FHR (i) is respectively above or below the baseline for at least 15 s and (ii) reaches a value of at least 15 bpm over the baseline at any moment during that period.This method is cited by Ayres [3] and Pardey [12], and was probably used by Wrobel [14] and Lu [7].For the aamcazares, aamjimenez, aammantel, and aamtaylor functions, the user can then choose to perform the standard method or the developer's specific method.

The viewer
By using the fhrmorpho function, the user can open an .fhrfile and display it using the specific interface.This interface shows the FHR and TOCO signal on the usual grid, and enables the user to scroll through the recording.The viewer shows the raw FHR (in black) and the pre-processed, interpolated FHR (in grey).If an AAM is selected, the corresponding baselines and A/Ds are displayed.The file's expert analysis can also be displayed (if it exists) or can be created.Creating the expert analysis consists first in drawing a baseline by linear interpolation between designated points.A mouse left click adds a point, and a right click removes a point.Next, the A/D periods can be defined, along with three different types of excluded period: unreliable signal (U), overshoot (O), or a period not to be analyzed (N).These periods are selected by pressing the corresponding keys (A, D, U, O or N) on the keyboard.
It is possible to open two or more windows simultaneously (for each AAM), with synchronized scrolling.

Statistical evaluations
In [16], we described several indices of the discordance between an AAM's analysis and the expert analysis.These indices can be displayed on the main fhrmorpho interface for an individual recording (see Fig. 1) or via the evaluateaam function, which computes them for a whole set of recordings.The computed indices are summarized in Table 2.In [16], we suggested that the MADI was the best criterion for the overall evaluation of a given AAM; the MADI was

Baseline evaluation
Root mean square difference (RMSD) between baselines Proportion of points displaying an absolute difference of more than 15 bpm (15 bpm difference rate)

Overall comparison
Synthetic inconsistency (SI) coefficient [21] Morphological analysis discordance index (MADI) [16] Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted: 15 June 2019 doi:10.20944/preprints201906.0139.v1 designed to give appropriate weight to differences between two analyses, and provides more reproducible results for all FHR files.The MADI is a specifically developed index that corresponds to a fuzzy measurement of the proportion of time during which two baselines suggest that the FHR signal is in the same state (i.e.baseline state, acceleration state or deceleration state).

IMPACT
This toolbox was used in studies [15] and [16] to compare the various literature AAMs by taking as reference an expert consensus.Using the data described in [17], all the experiments can therefore be repeated.Figure 2 shows each method's performance with regard to three criteria [16].The main conclusion of our research is that Lu et al.'s AAM [7] is significantly better than the 10 other AAMs for reproducing the expert analyses with regard to almost all the criteria studied.However, as shown in Figure 2, the Lu-expert difference appears to be greater than the inter-expert differences -suggesting that progress can and should be made in clinical practice.This toolbox will enable other researchers to (i) reproduce our experiments on the same dataset, (ii) visualize and better understand problematic patterns, and (iii) try to develop new AAMs and test them.The data used in [15] and [16] (described on [17]) are available at http://utsb.univcatholille.fr/fhr-review.Researchers who wish to compare their results with others can submit their analysis of the evaluation dataset, and the leaderboard will be displayed on this website.
The toolbox might also be useful for researchers wishing to automatically analyze FHR signals and quantify pathologic features (the number and surface of A/D, the occurrence of tachycardia, etc.).This process might be very important for objectively measuring the effect of treatments during the labor (amnioinfusion, the administration of oxytocin, etc.).
Lastly, the final objective of AAMs for the FHR is to best predict the risk of fetal acidosis and thus provide decision support (caesarean section, operative delivery, etc.).This research requires a huge dataset of deliveries so that the basic outputs of the toolbox (e.g. the number of accelerations, the surface of decelerations, and the base level, etc.) can be used to build a risk score.A few trials have been performed recently [20] but AAMs do not yet significantly improve the decision-making process.We hope that the toolbox presented here will help researchers to build better models.

CONCLUSIONS
The FHR morphological analysis toolbox is an opensource program for researchers seeking to improve signal processing methods or physicians seeking to quantify the pathological FHR features.It offers tools of preparatory work on this subject: data, a pre-processing function, display functions, and evaluation functions.
The toolbox focuses solely on morphological analysis.In future research, we shall program indices for evaluating FHR variability and dynamics, which are other features used to predict fetal acidosis.The final objective is to develop a predictive model of fetal acidosis.

Figure 1
Figure1shows a screenshot of the main fhrmorpho

Fig. 2 .
Fig.2.Performance of each AAM taking as reference expert consensus with regard to three indices (the F-measure for deceleration, the F-measure for of acceleration, and the RMSD for the baseline).The interexpert differences (Ei-Ej) are also shown for comparison.

TABLE 1 DESCRIPTION
OF THE ELEVEN METHODS OF FHR BASELINE COMPUTATION

15 June 2019 doi:10.20944/preprints201906.0139.v1 consensus
analysis is private.Researchers who develop new methods of FHR analysis are welcome to submit their AAM analysis (baseline and A/D) for evaluation.A leaderboard will be displayed at http://utsb.univ-catholille.fr/fhr-review.
Based on myriad filters: an intermediate approach, between a linear average filter and use of the mode.No (probably standard thresholding)Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted: