## 3 Methodology  
### Long Short-Term Memory Model  
The LSTM was proposed by [PERSON] and [PERSON] to solve the problems of optimization hurdle and vanishing gradient in the RNN model. The problems of the optimization hurdle and the vanishing gradient were a difficulty found in training artificial neural networks with gradient-based learning methods and backpropagation. The gradient is vanishingly small, effectively preventing the weight from changing its value. Moreover, these problems completely stop the neural network from training. To make matters worse, this occurred frequently, especially in long-time series data. Therefore, the LSTM could be applied to forecast long-time series data because of its efficiency in identifying long-term dependence over time and this has been studied in various fields [26; 27]. The main elements of LSTM are memory-moving cells, which can maintain the state over time and three gates that control the transfer of data in and out of cells, unlike the RNN model [28]. The LSTM applies the concept of a cell to update the state of a specific time (\(h_{t}\)) and determines whether to update the internal information or not by using the input data and the state so far. The types of gates for controlling data transfer of the cell are: a forget gate (\(f_{t}\)), an input gate (\(i_{t}\)) and an output gate (\(o_{t}\)). First the forget gate (\(f_{t}\)) applies the output of the previous cell (\(h_{t-1}\)) and the current input data (\(x_{t}\)) to the sigmoid activation function to obtain a value between 0 and 1 and determines whether to maintain or remove the input information. This can be shown in Equation (1):  
\[f_{t}=\sigma\Big{(}W_{f}\cdot[h_{t-1},x_{t}]+b_{f}\Big{)} \tag{1}\]  
where \(\sigma\) is the sigmoid activation function, \(W_{f}\) is the weight of the forget gate, and \(b_{f}\) is the bias of the forget gate. The second the input gate (\(i_{t}\)) decides which input information is stored in the cell and which information is updated by using the sigmoid activation function. The input gate also generates a candidate cell (\(N_{t}\)) which is used when updating a new cell state by using the hyperbolic tangent activation function. The candidate cell is expressed through the following equations:  
\[i_{t}=\sigma(W_{i}\cdot[h_{t-1},x_{t}]+b_{i}) \tag{2}\]  
\[N_{t}=tanh(W_{n}\cdot[h_{t-1},x_{t}]+b_{n}) \tag{3}\]  
where \(W_{i}\), and \(W_{n}\) denote the weights of the input gate and the candidate cell, respectively, \(b_{i}\), \(b_{n}\) denote the bias of the input gate and the candidate cell, respectively. Next, the current cell state (\(C_{t}\)) is updated by combining the previous cell state (\(C_{t-1}\)) and the candidate cell (\(N_{t}\)), as shown in Equation (4):  
\[C_{t}=f_{t}\cdot C_{t-1}+i_{t}\cdot N_{t} \tag{4}\]  
The output gate (\(o_{t}\)) determines which part of the cell state is output by using the sigmoid activation function, as shown in Equation (5) below. Finally, the hyperbolic tangent activation function is used to update the state of a specific time (\(h_{t}\)) by multiplying it with the activated cell state (\(C_{t}\)). \[o_{t}=\sigma(W_{o}\cdot[h_{t-1},x_{t}]+b_{o}) \tag{5}\]  
\[h_{t}=o_{t}\cdot\tanh\mathrm{h}(C_{t}) \tag{6}\]  
where \(W_{o}\) is the weight of the output gate and \(b_{o}\) is the bias of the output gate. Previous studies have shown that the LSTM could be used to accurately forecast water surface elevation [25]. However, the water surface elevation is under-forecasted at the high water surface elevation conditions because the hyperbolic tangent activation function (value range from \(-1\) to \(1\)) was basically used when multiplying the output gate and the cell state in the structure of LSTM. Thus, the hyperbolic tangent activation function should be changed another activation function to solve under-forecasting at the high water surface elevation conditions. In general, activation functions include linear and nonlinear functions.