# A Hybrid Deep Learning Model Based on FFT-STL Decomposition for Ocean Wave Height Prediction
## 2 Model Design
### Component-Specific Prediction Submodels
#### 2.2.1 BiLSTM Model for Trend Component Prediction  
In trend probability prediction, trend components often exhibit complex and long-term evolutionary characteristics. Traditional methods, such as moving average, linear regression, and ARIMA, have limitations in capturing nonlinearity and high-order dependencies, making it challenging to accurately model trend variations. These limitations become particularly evident in long-term predictions, where error accumulation is a common issue. In contrast, BiLSTM model excels at capturing long-term temporal dependencies in nonstationary signals and effectively predicting changes in wave height trend components, offering a more robust solution to the challenges of trend probability prediction. The BiLSTM model has strong learning ability, which stems from its unique data processing method. It evaluates data in both forward and backward directions by training two LSTM networks, one of which processes the input sequence forward and the other processes the reverse copy of the input in reverse. This bidirectional processing mechanism enables BiLSTM to capture data features more comprehensively, greatly improving the performance and prediction accuracy of the model [28]. LSTM is a special type of recurrent neural network that consists mainly of an input gate, a forget gate, an output gate, and a memory unit. Its mathematical expression is as follows:  
\[i_{t} =\sigma(W_{i}[h_{t-1},T_{t}]+b_{i}) \tag{5}\] \[f_{t} =\sigma(W_{f}[h_{t-1},T_{t}]+b_{f})\] (6) \[o_{t} =\sigma(W_{o}[h_{t-1},T_{t}]+b_{o})\] (7) \[\bar{\mathcal{C}}_{t} =tanh(W_{c}\cdot[h_{t-1},T_{t}]+b_{c})\] (8) \[\mathcal{C}_{t} =f_{t}\cdot C_{t-1}+i_{t}\cdot\bar{\mathcal{C}}_{t}\] (9) \[h_{t} =O_{t}\cdot tanh\cdot C_{t} \tag{10}\]  
Here, \(i_{t}\) represents the input gate, \(f_{t}\) represents the forget gate, and \(o_{t}\) represents the output gate. \(C_{t}\) and \(C_{t-1}\) denote the cell state at the current and previous time steps, respectively. \(W\) refers to the weight matrix assigned to each layer, \(T_{t}\) is the input at the current time step, and \(b\) represents the bias term. \(\sigma\) denotes the sigmoid activation function, while \(\cdot\) represents the Hadamard product. The internal mechanism of the LSTM regulates the flow of information through these gates. The input gate regulates the extent to which the current input information is stored in the memory unit. The forget gate controls the degree to which past information is discarded from the memory unit, preventing the model from losing long-term dependencies. The output gate determines the information to be emitted based on both the memory unit's content and the current input. The memory unit, which can retain and update information over extended periods, effectively captures long-term dependencies within input sequences. The specific structure of the internal hidden layer is shown in Figure 2.  
The BiLSTM neural network model can be regarded as a composite of two LSTM networks that process data in opposite directions. Its structure is shown in Figure 3.  
Given the wave height data decomposition trend sequence, it is expressed as  
\[T(t)_{t=1}^{N} \tag{11}\]  
The forward LSTM layer computes a series of hidden states \(\overrightarrow{h_{t}}\) by iterating from \(t=1\) to \(t=N\). Meanwhile, the backward LSTM layer processes the sequence in reverse, producing the hidden state \(\overleftarrow{h_{t}}ht\) by iterating from \(t=N\) downward to \(t=1\). The outputs  
2.2.3. 1D-CNN for Remainder Component Prediction  
The remainder part contains information that traditional models cannot capture in the original dataset. Effectively modeling and predicting this part can significantly improve the accuracy of the overall prediction. The one-dimensional convolutional neural network is a powerful deep learning model that excels at processing time-series data. This section explains in detail the principle of using the 1D-CNN model for remainder prediction. 1D-CNN mainly consists of convolution layers, pooling layers and fully connected layers.