# Risk Prediction Model for Tailings Ponds Based on EEMD-DA-LSTM Model
## 2 Research Methods
### Long Short-Term Memory Neural Network  
A long short-term memory (LSTM) neural network is a special kind of recurrent neural network (RNN). The LSTM neural network can achieve selective memory of historical information and fully capture the long time-dependent information of nonlinear time series data.  
The LSTM network unit includes the forgetting gate, input gate, output gate, and unit state. The first step of LSTM computation is to selectively discard the previous moment state information through the forgetting gate. First, the input vector \(p_{t}\) at moment t is extracted and combined with the output vector \(h_{t-1}\) at moment \(t-1\) to obtain the splice vector, \([h_{t-1},p_{t}]\). Then, the proportion of retainable information through the activation function \(\sigma\) is calculated, and the specific calculation is shown in Equation (7).  
\[f_{t}=\sigma\Big{(}w_{f}\cdot[h_{t-1},p_{t}]+b_{f}\Big{)} \tag{7}\]  
In the equation, \(f_{t}\in[0,1]\) denotes the output vector of the oblivion gate at time \(t\), and \(w_{f}\) and \(b_{f}\) denote the weight matrix and bias vector corresponding to the forgetting gate, respectively.  
In the second step, the information of the current moment is selectively updated through an input gate to decide which information can enter the cell state of the current moment. First, the output of the previous moment and the input of the current moment are transformed into a vector of candidate memory cells \(\widetilde{c}_{t}\) using the tanh function. Then, the proportion added to the unit state \(\widetilde{c}_{t}\) is calculated by the activation function \(\sigma\), as shown in Equations (8) and (9).  
\[\widetilde{c}_{t}=\tanh(w_{c}\cdot[h_{t-1},p_{t}]+b_{c}) \tag{8}\]  
In the equation, \(w_{c}\) and \(b_{c}\) denote the weight matrix and bias vector corresponding to the cell state, respectively.  
\[i_{t}=\sigma(w_{i}\cdot[h_{t-1},p_{t}]+b_{i}) \tag{9}\]  
In the equation, \(i_{t}\in[0,1]\) denotes the output vector of the input gate at time t; and \(w_{i}\) and \(b_{i}\) denote the weight matrix and bias vector corresponding to the input gate, respectively. Based on the calculation results of the forgetting gate and the input gate and the unit state of the previous moment, the unit state information of the current moment is updated, and the calculation equation is shown in Equation (10).  
\[c_{t}=f_{t}\cdot c_{t-1}+\mathbf{i}_{t}\cdot\widetilde{c}_{t} \tag{10}\]  
In the equation, \(c_{t-1}\) and \(c_{t}\) denote the unit state vectors at moments \(t-1\) and \(t\), respectively.  
Finally, the information of the state of the control unit is output through the output gate. Based on the output at moment \(t-1\) and the input at moment \(t\), the activation function \(\sigma\) is used to calculate the output of the output gate at the moment \(t\). Then, the tanh function is used to process the unit state information at the current moment and finally, the output \(h_{t}\) at the moment t is obtained. The calculations are shown in Equations (11) and (12).  
\[o_{t}=\sigma(w_{o}\cdot[h_{t-1},p_{t}]+b_{o}) \tag{11}\]  
In the equation, \(o_{t}\) denotes the output vector of the output gate at time t and \(w_{o}\) and \(b_{o}\) denote the weight matrix and bias vector corresponding to the output gate, respectively.  
\[h_{t}=o_{t}*\tanh(c_{t}) \tag{12}\]