## 3 Experiment
### Ship Temperature Regression Experiment  
The predictive performance of machine learning models mainly depends on data quality and model parameter tuning. Therefore, for further improvement of the model prediction effectiveness, this study requires fine-tuning of the sea surface temperature diurnal cycle amplitude prediction model based on the XGBoost algorithm. To train the XGBoost model, we first prepare the dataset by splitting it into training and testing sets. Then, we initialize the XGBoost model and fit it to the training data. This involves feeding the features into the model and allowing for it to learn the underlying patterns. We apply \begin{table}
\begin{tabular}{c c c} \hline \hline
**Method** & **Fusion Unit** & **mIoU (\%)** \\ \hline FCN & \(L_{ce}\) & 85.4 \\ FCN & \(L_{FL}\) & 85.2 \\ FCN & \(L_{EDice}\) & 87.6 \\ DeepLabv3+ & \(L_{ce}\) & 87.9 \\ DeepLabv3+ & \(L_{FL}\) & 87.5 \\ DeepLabv3+ & \(L_{EDice}\) & 89.2 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Ablation experiments on the effect of different loss functions. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Backbone** & **Fusion Unit** & **ASPP** & **mIoU (\%)** \\ \hline Naive FCN & - & - & - & 56.42 \\ FCN & ResNet50 & - & \(\surd\) & 76.59 \\ IERNet & ResNet50 & \(\surd\) & - & 83.15 \\ IERNet & ResNet50 & \(\surd\) & \(\surd\) & 86.48 \\ FCN & ResNet101 & - & \(\surd\) & 77.92 \\ IERNet & ResNet101 & \(\surd\) & - & 75.14 \\ IERNet & ResNet101 & \(\surd\) & \(\surd\) & 87.29 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: FCN-based ablation experiments. the model iteratively, adjusting the parameters based on performance metrics to improve prediction accuracy. Five key parameters significantly impact the predictive performance of the XGBoost model. Among them, n_estimators determines the number of weak learners in the ensemble algorithm. A higher value increases the model's learning capacity but also raises the risk of overfitting. max_depth controls the maximum depth of the trees in the model. A higher value leads to a more complex model and increases the risk of overfitting. The subsample parameter controls the proportion of randomly selected data for training, while the learning_rate parameter regulates the iteration rate; both help prevent overfitting. The gamma parameter controls the minimum loss function required for node splitting, reducing model complexity and accelerating algorithm convergence. We adjusted the key parameters of the XGBoost algorithm through multiple rounds of testing, using cross-validation results as the criteria for parameter selection. Cross-validation helps us evaluate the model's performance by training it on different subsets of the data and ensuring that the model generalizes well to unseen data. Random search or grid search techniques are applied to optimize these hyperparameters, systematically testing different combinations to find the most effective configuration. The final optimal values for the five key parameters are shown in Table 5.  
First, the ship's lateral temperature dataset is randomly split into training and testing sets in an 80%:20% ratio. Then, based on the XGBoost algorithm, the model is trained on the training set to construct a regression prediction model for ship temperature. Finally, the model's predictive ability is validated using the testing set. This study utilizes the Python programming language environment (Python v3.9) to build the XGBoost model, primarily based on the scikit-learn library. Following the prediction algorithm workflow, the preprocessed dataset is imported into the XGB model. After finding the optimal parameters, the model is trained to obtain the prediction results. Table 6 shows that the model achieves high goodness of fit and small error values on both the training and testing sets, demonstrating its good performance in predicting ship temperature. Regarding goodness of fit, the XGBoost model achieves over 70%. In terms of error, the RMSE values for both models are 3.472, indicating minor errors.