# An Improved Bi-LSTM-Based Missing Value Imputation Approach for Pregnancy Examination Data
## 2 Materials and Methods
### Strategy to Fill Missing Values--Bi-Lstm
The higher it is, the lower the missing data rate of the time point is, and the lower the possibility it needs to be filled is. Thus, for each series, the possibility that each time point is selected to be a marker \(p_{i}=\alpha*a_{i}+\beta*b_{i}\), where \(\alpha\) and \(\beta\) are the parameters that adds up to 1, which are used to adjust the influence of the two parts of the possibility. We select data of a certain number of time points in each series as markers to construct the data and markers of the training set. According to distribution of the data, the final parameters used in this paper are \(\gamma=0.5,\alpha=0.8,\beta=0.2\), and the data at four time points are selected as markers. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \(x\) & 1 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 1 & 0 \\ \(\beta\) & 0.011 & 0.085 & 0.076 & 0.105 & 0.062 & 0.176 & 0.127 & 0.142 & 0.102 & 0.113 \\ \hline \end{tabular}
\end{table} 
Table 6: Calculation sample of “ignorability” of data in time series. Figure 6: Distribution of physical examination times during pregnancy after preprocessing  
In this paper, we compare several methods of filling missing values, including traditional machine learning methods, such as cubic spline interpolation and KNN filling, and deep learning methods, such as the LSTM model and bidirectional LSTM model. 1 Cubic spline interpolation  
Cubic spline interpolation (spline interpolation) [29] is a process of obtaining the curve function group by solving the three-moment equations through a series of value points on the curve. First, we select an interval containing missing values of the dataset, construct a cubic interpolation equation to represent the interval, and then conduct interpolation for the missing values according to the equation. 2 KNN filling  
The idea of the KNN method is to identify k spatially similar samples in the dataset. We then use these \"k\" samples to estimate the value of the missing data points. The missing value of each sample is interpolated using the mean value of the \"k\" neighborhood found in the data set. In this case, as Figure 7 shows, the missing value is determined by its neighbors. The green point's neighbors are the orange points in the ellipse. Each pregnant woman's data are mapped to a vector in a high-dimensional space. To be spatially close means to be physically similar. 3 ST-MVL  
ST-MVL is a spatio-temporal multiview-based learning (ST-MVL) method [30] to collectively fill missing readings in a collection of geosensory time series data considering (1) the temporal correlation between readings at different timestamps in the same series and (2) the spatial correlation between different time series. The method combines empirical statistic models, consisting of inverse distance weighting and simple exponential smoothing, with data-driven algorithms, comprised of user-based and item-based collaborative filtering. 4 LSTM Model  
The LSTM model is a special kind of recurrent neural network (RNN), which was first proposed by [PERSON] and [PERSON] [31] in 1997 and solved the problem of the vanishing gradient and long-term dependence (i.e., the inability to integrate dependencies of a series that are too long) of RNNs. As shown in Figure 8, an LSTM consists of a memory unit \(c\) and three gates (an input gate \(i\), output gate \(o\), and forgetting gate \(f\)). The first step of the LSTM is to determine how much of the state of the previous time point \(c_{t-1}\) will be retained to the current moment \(c_{t}\). This decision is made by the \"forgetting gate\". The forgetting gate uses the output \(h_{t-1}\) of the previous neural cell and the input \(x_{t}\) of the current cell to calculate a number between 0 and 1, representing how much data from the previous cell was recorded. Here, 1 indicates complete recording, and 0 indicates complete forgetting.