# A Hybrid Model of Conformer and LSTM for Ocean Wave Height Prediction
## 2 Materials and Methods
### Dataset  
The data come from the buoy data of the National Oceanic and Atmospheric Administration (NOAA) NDBC, mainly distributed in the North Atlantic, Pacific, and Gulf of Mexico near North America. Table 3 covers different water depths to verify the generalization of the model. The buoy data have a sampling interval of one hour, and the site information used in this experiment is shown in the Table 3 and Figure 5.  
When selecting sites, we chose different sites located in the Gulf of Mexico, along the Pacific coast, and along the Atlantic coast. Similarly, the sea areas of these sites have different depths. The shallowest depth we selected is 84 m, and the deepest is 5394 m. Depth has a certain impact on wave height, and the depth at the location of the same buoy will not change. We hope the diversity of depth and location can prove the generalizability of our model. Since the raw wave data directly obtained contain a small number of missing values, the existence of these missing values can make the prediction accuracy and generalization performance poor. Therefore, it is necessary to first interpolate the missing data using the previous and next moment data. Table 4 shows the number and percentage of missing values in the selected datasets. The number of missing values is relatively small because we prioritized selecting sites with  
Figure 5: Station distribution map. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Site Name** & **Longitude** & **Latitude** & **Water Depth** & **Time Range** \\ \hline
41048 & 69\({}^{\circ}\)34\({}^{\prime}\)23\({}^{\prime\prime}\) W & 31\({}^{\circ}\)49\({}^{\prime}\)53\({}^{\prime\prime}\) N & 5394 m & 1 January 2021–31 December 2021 \\
46047 & 119\({}^{\circ}\)31\({}^{\prime}\)30\({}^{\prime\prime}\) W & 32\({}^{\circ}\)23\({}^{\prime}\)18\({}^{\prime\prime}\) N & 1423 m & 1 January 2022–31 December 2022 \\
41040 & 53\({}^{\circ}\)8\({}^{\prime}\)11\({}^{\prime\prime}\) W & 14\({}^{\circ}\)32\({}^{\prime\prime}\) W & 4988 m & 1 January 2020–31 December 2020 \\
42020 & 96\({}^{\circ}\)41\({}^{\prime}\)12\({}^{\prime\prime}\) W & 26\({}^{\circ}\)57\({}^{\prime}\)18\({}^{\prime\prime}\) N & 84 m & 1 January 2022–31 December 2022 \\
42057 & 81\({}^{\circ}\)34\({}^{\prime}\)31\({}^{\prime\prime}\) W & 16\({}^{\circ}\)58\({}^{\prime}\)22\({}^{\prime\prime}\) N & 412 m & 1 January 2020–12 December 2020 \\
46025 & 119\({}^{\circ}\)2\({}^{\prime}\)42\({}^{\prime\prime}\) W & 33\({}^{\circ}\)45\({}^{\prime}\)19\({}^{\prime\prime}\) N & 890 m & 1 January 2022–31 December 2022 \\
42002 & 93\({}^{\circ}\)38\({}^{\prime}\)46\({}^{\prime\prime}\) W & 26\({}^{\circ}\)37\({}^{\prime}\)18\({}^{\prime\prime}\) N & 3088 m & 1 January 2022–31 December 2022 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Site information. sufficient data when choosing our dataset. If a site had too many missing values, it would significantly affect our predictions. Since the units of wave height, wind speed, and air temperature are different and the numerical values vary greatly, direct use in training will lead to unfair calculation of data, so the original data are normalized using the minimum-maximum method, mapping all feature data to the interval (0, 1), ensuring that all features are treated fairly during the training process of the fusion model and improving the prediction accuracy. The specific formula is as follows (10) [28]:  
\[\widetilde{\mathbf{x}}=\frac{\mathbf{x}-\mathbf{x}_{min}}{\mathbf{x}_{max}-\mathbf{x}_{min}} \tag{10}\]  
Considering the needs of time series forecasting, this study constructs training and testing time series datasets through the sliding window method. Each data instance consists of 24 consecutive time steps, which are used to predict the wave height of the next time step. For each time point, the data of the previous 24 time points are used as input features, and the wave height of the next time point is used as the target output. Each group of samples includes four feature values, which are wave height, wind speed, air temperature, and atmospheric pressure.