# Assessment of Hull and Propeller Degradation Due to Biofouling Using Tree-Based Models
## 4 Development of Data-Driven Models
### Feature Engineering  
Feature engineering requires domain knowledge and comprises feature construction and feature selection. In feature construction, new variables are built using existing ones for a more accurate physical description of the problem. Specifically, aft and fore draft measurements are combined to calculate the mean draft and trim of the vessel, according to Equations (2) and (3). In addition, the sea current speed is calculated as the difference between speed over ground (SOG) and speed through water (STW), as stated in Equation (4). The relative wind speed and direction measurements are combined to determine the longitudinal and transverse components of the relative wind speed, according to Equations (5) and (6). Similarly, in Equation (7) the relative wave angle is calculated to determine the longitudinal and transverse components of the significant wave height,  
Figure 6: Flow diagram of the calculation framework for the biofouling assessment. according to Equations (8) and (9). To account for the strong time dependence of fouling growth, the Days feature was added, which is equal to the number of days passed since the last hull and propeller maintenance event. For each data point recorded on a given date, the Days feature was calculated according to Equation (10). Thus, for each dataset mentioned in Table 3, the Days feature was created separately, based on the respective starting date. \[\text{Mean draft}=\frac{\text{Fore Draft}+\text{Aft Draft}}{2} \tag{2}\]  
\[\text{Trim}=\text{Fore Draft}-\text{Aft Draft} \tag{3}\]  
\[\text{Current}=\text{SOG}-\text{STW} \tag{4}\]  
\[\text{Wind x}=\text{Relative Wind Speed}\cdot\text{cos}(\text{Relative Wind Angle}) \tag{5}\]  
\[\text{Wind y}=\text{Relative Wind Speed}\cdot\text{sin}(\text{Relative Wind Angle}) \tag{6}\]  
\[\text{Relative Wave Angle}=\text{abs}(\text{Vessel Heading}-\text{Wave Direction}) \tag{7}\]  
\[\text{Wave x}=\text{Wave Height}\cdot\text{cos}(\text{Relative Wave Angle}) \tag{8}\]  
\[\text{Wave y}=\text{Wave Height}\cdot\text{sin}(\text{Relative Wave Angle}) \tag{9}\]  
\[\text{Days}=\text{Date}-\text{Date of last maintenance event} \tag{10}\]  
In feature selection, the most important input variables are determined with the help of appropriate statistical tools, whereas irrelevant or redundant input variables are eliminated to simplify the model and prevent overfitting. To determine the necessary features, two criteria are used: comprehension of the physical problem and correlation analysis. Based on domain knowledge, among all available variables, a few were shortlisted as feature candidates for SHP prediction. Then, correlation analysis was performed on those candidates using the distance correlation method, with the results presented in \[\text{Mean draft}=\frac{\text{Fore Draft}+\text{Aft Draft}}{2} \tag{2}\]0 Distance correlation was presented by [26] and constitutes a measure of statistical dependence between two random variables that captures both linear and nonlinear relationships. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Unit** & **Distance Correlation Coefficient** \\ \hline RPM & rpm & 0.8620 \\ \hline STW & kn & 0.4509 \\ \hline Mean Draft & m & 0.3014 \\ \hline Trim & m & 0.3724 \\ \hline RoT & deg/min & 0.0778 \\ \hline Wave & m & 0.1434 \\ \hline Wind & m/s & 0.1816 \\ \hline Wave x & m & 0.2007 \\ \hline Wave y & m & 0.1115 \\ \hline Wind x & m/s & 0.2252 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Calculation of the distance correlation coefficient between SHP and the candidate features. While traditional correlation measures such as Pearson's correlation coefficient are effective for capturing linear relationships, they often fail to detect complex dependencies that may exist in the data. Distance correlation overcomes this limitation by considering the distances between observations rather than assuming a specific functional form. It provides a robust measure of dependence that can reveal intricate relationships that may be missed by traditional methods.