## 2 NN-Based BPE
### NN Training and BPE  
Once the feature vector is extracted, the NN model is trained to estimate the SBP and DBP for which there are two major stages including a parameter initialization stage and fine-tuning stage. For this, the feature vector is first normalized using their means and standard deviations (SD) [29]. For this, the exponential linear unit (ELU) \(f(t)\)[30] is used for the activation function of the hidden layers as given by:  
\[f(t)=\left\{\begin{array}{ll}t&t\geq 0\\ \alpha(e^{t}-1)&t<0\end{array}\right. \tag{1}\]  
where \(t\) is an argument of the ELU function. Also, \(\alpha\) denotes the parameter of the ELU function and then the parameter is set to 1.  
Then, we update the parameters such as the weights and biases of each layer in accordance with the minimum mean square error (MMSE) [31] between the estimated BP and reference BP. In addition, the MMSE plays the role of the error function \(E\) of the NN using mini-batches as follows:  
\[E=\frac{1}{K}\sum_{k=1}^{K}[\hat{Y}_{k}(w^{(l)},b^{(l)})-Y_{k}]^{2} \tag{2}\]  
where \(k\) denotes an index of the mini-batch with \(K\) representing the mini-batch size, and \(\hat{Y}_{k}(w^{(l)},b^{(l)})\) and \(Y_{k}\) are denote the estimated BP and target BP, respectively. Also, \(w^{(l)}\) and \(b^{(l)}\) are, respectively, the weight and bias of the \(l\)th layer. Finally, the parameters of each hidden layers are updated repeatedly using the learning rate \(\lambda\) as follows [31]:  
\[(w^{(l)},b^{(l)})=(w^{(l)},b^{(l)})-\lambda\frac{\partial E}{\partial(w^{(l)},b^{(l)})},1\leq l\leq L+1 \tag{3}\]  
Thus, we set the values of the SBP and DBP as the target vectors, and obtain the NN models to estimate the SBP and DBP. To estimate the SBP and DBP using the NN models, we employ the weight and bias to estimate the BP such that  
\[\text{SBP}=f(f(D\cdot w_{\text{SBP},1}+b_{\text{SBP},1})w_{\text{SBP},2}+b_{ \text{SBP},2})w_{\text{SBP},\text{out}}+b_{\text{SBP},\text{out}} \tag{4}\]  
\[\text{DBP}=f(f(D\cdot w_{\text{DBP},1}+b_{\text{DBP},1})w_{\text{DBP},2}+b_{ \text{DBP},2})w_{\text{DBP},\text{out}}+b_{\text{DBP},\text{out}} \tag{5}\]  
where \(w_{1},w_{2}\), and \(w_{\text{out}}\) are the weight of each layer, and \(b_{1},b_{2}\) and \(b_{\text{out}}\) are the bias of each layer. Also, \(D\) denotes the feature vector. Finally, the output of the NN model is de-normalized for representing the SBP and DBP unit (mmHg) using the pre-computed mean and SD [24].  
Also, to improve the performance of the proposed algorithm, we employ the two-stage system based on the stacked NN [32]. The two-stage system exhibits the structure of the cascade type using the stacked NN which is connected with the first NN model as shown in Figure 1. For this, input features of the stacked NN model consist of the extracted feature and estimated BP of the first NN. The feature added for the stacked NN model acts as the major feature which helps to train the stacked model which estimates more elaborately the BP than the first NN. In addition, the stacked NN model is trained equally with a procedure of the first NN training as in Equations (1)-(5).  
To estimate the BP using the two-stage system based on the stacked NN, the first NN model equipped with the extracted features estimates the BP and then the estimated BP is used as the input feature of the stacked NN. Hence, the estimated BP of the first NN model is concatenated with the extracted features to construct the stacked NN input. Finally, after the stacked NN model estimates the BP as in Equations (4) and (5) using the constructed input, the estimated value is calculated through the de-normalization using the mean and SD.