## 2 Method
### LSTM Training and Classification  
Once the feature selection for the EMG signal is achieved, we train the LSTM model using the LSTM scheme [21], which is employed for this classification task, to classify the VNVMC signal. For the LSTM learning, the feature vector is normalized using the mean and standard deviation (SD) of the feature vector [22]. The structure of the LSTM is composed of the hidden state and cell state, and the cell state includes information about the long-term and short-term data. The LSTM learning scheme is constructed of two major steps, including a forward propagation stage and a fine-tuning stage to train the LSTM model. In the forward propagation stage, the forward propagation consists of forget gate, input gate, and output gate, as shown in Figure 4, and then fine-tuning employs a back-propagation technique to update the parameters, which include the weight matrix and the bias vector [23]. For this, we first calculate the forget gate \(f_{t}\) as follows:  
\[f_{t}=\sigma(W_{f}[h_{t-1},D_{t}]+b_{f}) \tag{3}\]  
where \(W_{f}\) and \(b_{f}\) denote the weight matrix and bias vector for the forget date, respectively. \(h_{t-1}\) is the hidden state of the previous state and \(D_{t}\) denotes the normalized feature vector. \(\sigma\) and \(t\) are the sigmoid function and index of the hidden state. Then, we calculate the input gate \(i_{t}\times\tilde{C}_{t}\) as follows:  
\[i_{t}=\sigma(W_{i}[h_{t-1},D_{t}]+b_{i}) \tag{4}\]  
\[\tilde{C}_{t}=\tanh(W_{C}[h_{t-1},D_{t}]+b_{C}) \tag{5}\]  
where \(i_{t}\) and \(\tilde{C}_{t}\) are the output of each neural network layer for the input gate. \(W_{i}\) and \(b_{i}\) denote the weight matrix and bias vector for \(i_{t}\). \(W_{C}\) and \(b_{C}\) denote the weight matrix and bias vector for \(\tilde{C}_{t}\). Then, we update the current cell state \(C_{t}\) as follows:  
\[C_{t}=f_{t}\times C_{t-1}+i_{t}\times\tilde{C}_{t} \tag{6}\]  
where \(C_{t-1}\) denotes previous cell state. Finally, we calculate the current hidden state \(h_{t}\) as follows:  
\[h_{t}=o_{t}\times\tanh(C_{t}) \tag{7}\]  
\[o_{t}=\sigma(W_{o}[h_{t-1},D_{t}]+b_{o}) \tag{8}\]  
where \(o_{t}\) denotes result of the output gate. \(W_{o}\) and \(b_{o}\) are the weight matrix and biad vector for the output gate, respectively. After this procedure is performed recurrently for all states and the LSTM cell, the result of the states for the LSTM model is connected to the output layer, which has one hidden unit. Then, we update the weight matrix and the bias vector at each LSTM layer based on the cross-entropy loss function. The cross-entropy plays the role of a loss function \(L\) of the LSTM using mini-batches, as follows [24]:  
\[L=\frac{1}{M}\sum_{m=1}^{M}[Y_{m}\text{ln}(\hat{Y}_{m})+(1-Y_{m})\text{ln}(1- \hat{Y}_{m})] \tag{9}\]  
where \(Y_{m}\) and \(\hat{Y}_{m}\) denote the VNV reference and prediction result of LSTM, respectively. \(m\) is an index of the mini-batch, with M representing the mini-batch size. To optimize the parameters of the LSTM, such as the weight matrix and bias vector, the parameters are repeatedly updated by the adaptive moment estimation (ADAM) [25]. In addition, the procedure is repeatedly carried out for the high-performance model until a specific epoch, and we then classify the VNVMC through the threshold using the trained LSTM model.