# Assessment of Hull and Propeller Degradation Due to Biofouling Using Tree-Based Models
## 4 Development of Data-Driven Models
### ML Model Calculations
\begin{table}
\begin{tabular}{l c c} \hline \hline \multirow{2}{*}{**ML Algorithm**} & **Model-1 Mean** & **Model-2 Mean** \\  & **Cross-Validated RMSE [kW]** & **Cross-Validated RMSE [kW]** \\ \hline Decision Tree & 184.3 & 151.6 \\ \hline Random Forest & 154.4 & 134.2 \\ \hline Extra Trees & 148.0 & 116.9 \\ \hline Gradient Tree Boosting & 157.4 & 128.4 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Mean cross-validated RMSE for each ML algorithm. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Hyperparameter**} & **Min** & **Max** & **Step** & **Best** \\ \hline \multirow{3}{*}{Decision Tree} & maximum depth of the tree (max depth) & 5 & 30 & 1 & 23 \\ \cline{2-6}  & minimum number of samples required to & 1 & 20 & 1 & 3 \\ \cline{2-6}  & be at a leaf node (min samples leaf) & 5 & 30 & 1 & 20 \\ \hline \multirow{3}{*}{Random Forest} & min samples leaf & 1 & 20 & 1 & 4 \\ \cline{2-6}  & number of trees in the forest (n estimators) & 20 & 200 & 5 & 110 \\ \hline \multirow{3}{*}{Extra Trees} & max depth & 5 & 30 & 1 & 20 \\ \cline{2-6}  & min samples leaf & 1 & 20 & 1 & 4 \\ \cline{2-6}  & n estimators & 20 & 200 & 5 & 120 \\ \hline \multirow{3}{*}{Gradient Tree Boosting} & max depth & 5 & 30 & 1 & 14 \\ \cline{2-6}  & number of boosting stages to perform & 20 & 200 & 5 & 135 \\ \cline{1-1} \cline{2-6}  & learning rate & 0.05 & 1 & 0.01 & 0.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: Overview of the hyperparameter values explored for each ML algorithm using randomized search combined with cross-validation. trees also significantly outperformed random forest (\(p=0.004\)) and gradient tree boosting (\(p=0.002\)), while random forest and gradient tree boosting were marginally different (\(p=0.049\)). The results suggested that, in both models, the extra trees algorithm significantly outperformed the other methods, while decision tree consistently exhibited worse performance compared to all ensemble methods. The pairwise comparisons also revealed that random forest and gradient boosting performed similarly, with only marginal differences between them in certain cases. The statistical analysis reinforced the conclusion that extra trees was the most suitable algorithm for this regression task, as it consistently showed the lowest RMSE and significantly better performance across the folds compared to the other methods. Hence, the extra trees algorithm was selected. The model development process was completed by evaluating the selected, top-performing, ML algorithm (extra trees ensemble method) on the test set, with the objective of assessing the model's generalization capacity. The test set provided a reliable final measure of how well the model performed when applied to unseen data, because it had not been involved in either training or validation. Thus, error metrics suitable for regression tasks were used, and the results are reported in Table 11. The model's performance was evaluated using error metrics on the test set, which consisted of data absent from the training and validation process. Let \(\hat{y_{i}}\) be the value predicted by the model for the i-th sample, \(y_{i}\) be the respective actual value, and \(\epsilon_{i}=y_{i}-\hat{y_{i}}\) be the corresponding error.