# A Machine Learning Predictive Model for Ship Fuel Consumption
## 3 Analysis of Results  
The number of input variables was reduced from 30 to 17 main parameters and one target variable only, fuel consumption, as model output. The statistical results, such as mean, median, minimum and maximum, denoting the database records concerning the numerical variables after the preprocessing phase, can be seen in Table 4.  
For validation of the proposed algorithms--Decision Tree, Random Forest, Extra Tree, Gradient Boosting, Extreme Gradient Boosting, and CatBoost--a regression analysis was developed by partitioning the database of surveyed vessels into plots for training, testing and validation in the proportion of 70%, 20%, and 10%, respectively, of the total contingent of records. For the Feature Selection step, as advocated by the works developed by [PERSON] et al. [25] and [PERSON] et al. [33], due to the need to know the existing relationship between the input and target variables of the model, it was decided to apply the Pearson Correlation Method. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Features 1** & **M** & **MD** & **MN** & **25\%** & **50\%** & **75\%** & **MX** \\ \hline Length & 26.0 & 10.9 & 6.0 & 19.0 & 23.3 & 31.3 & 76.0 \\ Breadth & 5.9 & 2.6 & 1.5 & 4.0 & 5.7 & 7.4 & 21.4 \\ Draft & 1.5 & 0.58 & 0.3 & 1.1 & 1.5 & 1.8 & 5.0 \\ Depth & 2.1 & 0.79 & 0.6 & 1.6 & 2.0 & 2.5 & 14.0 \\ Motor Power & 393.1 & 281.1 & 80.0 & 200 & 350.0 & 480.0 & 2750.0 \\ Cruising Speed & 16.2 & 6.34 & 8.0 & 12.0 & 15.0 & 19.7 & 40.0 \\ Number of Thrusters & 1.3 & 0.59 & 1.0 & 1.0 & 1.0 & 2.0 & 5.0 \\ TGS & 150.6 & 187.3 & 5.0 & 35.0 & 109.0 & 141.5 & 1600.0 \\ Light Displacement & 29.0 & 35.5 & 2.0 & 7.0 & 21.0 & 28.0 & 297.0 \\ Number of Generators & 1.2 & 0.7 & 0.0 & 1.0 & 1.0 & 2.0 & 5.0 \\ Passenger Capacity & 140.0 & 159.3 & 10.0 & 52.0 & 88.0 & 145.0 & 1400.0 \\ Cargo Capacity & 113.3 & 182.1 & 0.0 & 5.0 & 46.0 & 130.0 & 1600.0 \\ Crew & 4.4 & 2.42 & 1.0 & 3.0 & 4.0 & 6.0 & 22.0 \\ Travel Duration & 20.4 & 37.5 & 0.2 & 3.0 & 9.0 & 21.7 & 768.0 \\ Fuel Consumption & 1270.8 & 2136.6 & 5.0 & 150.0 & 400.0 & 1300.0 & 20,000.0 \\ \hline \hline \end{tabular}  
* For a clearer understanding regarding the metrics used: M—Mean; MD—Median; MN—Minimum; MX—Maximum.  
\end{table} 
Table 4: Database distribution after the processing phase. The correlation matrix between the parameters is shown in Figure 5, whose values range from \(-1\) to \(+1\) between light and dark shades, demonstrating the affinity between such variables: the greater the dependence between two variables, the closer to \(+1\) will be the term contained in the intersection between both, besides assuming a lighter shade color, a factor that may even represent redundancy between variables. The input parameters of the model are identified on the \(x\) and \(y\) axes, while the main diagonal presents a spread of the relationships between the parameters in which, whether in the triangle below or above the main diagonal, the variables and relationships do not change [81]. For the operational parameters--travel time, distance and speed--the correlation coefficients obtained were \(+0.85\), \(+0.78\), and \(-0.21\). The longer a vessel is sailing, consequently, the greater amount of oil will be demanded for combustion, impacting the volume of fuel consumed. The same premise applied to trips over long distances: trips with longer itineraries tend to consume more fuel than if compared to fast trips. Speed, in turn, presented the strongest negative correlation of all the predictors surveyed. The higher the cruising speed of the vessel, the lower its fuel consumption since the travel time will be shorter. Taking into account only the dimensional attributes of the collected records, the length (\(+0.58\)) stood out with the highest correlation with fuel consumption, demonstrating that the larger the vessel in its longitudinal direction, the greater the tendency of the vessel to consume a considerable volume of fuel.