# A Machine Learning Predictive Model for Ship Fuel Consumption
## 3 Analysis of Results
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Model** & **MAE** & **MSE** & **RMSE** & **CPT** & **R\({}^{2}\)** \\ \hline
1 & CatBoost & 348.48 & 728,175 & 779.98 & 3.802 & 0.852 \\
2 & Extreme Gradient Boosting & 409.23 & 979,122 & 899.79 & 1.499 & 0.797 \\
3 & Random Forest & 387.08 & 1,006,461 & 909.40 & 0.647 & 0.790 \\
4 & Gradient Boosting & 406.33 & 1,018,512 & 916.01 & 0.240 & 0.787 \\
5 & Extra Tree & 352.67 & 1,054,447 & 912.19 & 0.526 & 0.751 \\
6 & Decision Tree & 433.02 & 1,581,347 & 1144.34 & 0.015 & 0.669 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance metrics of the six models trained using the cross-validation method in 10 rounds. The Table 7 shows the Mean Absolute Error (MAE), Mean Square Error (MSE), Root Mean Square Error (RMSE), and Coefficient of Determination (R\({}^{2}\)); however, based only on the results presented by CatBoost after the final hyperparameter optimization step. By applying the Cross-Validation Method [32], a given row exposes the results obtained in one round, in which a part of the data was removed from the set and put back in the subsequent round. It was aimed to reduce model bias and avoid overfitting the model relative to the training and test data. The hyperparameter optimization performed caused the CatBoost model performance metrics to improve, increasing the Coefficient of Determination (R\({}^{2}\)) by +1.5% and varying the others: MAE by \(-\)5.91%, MSE by \(-\)7.01% and RMSE by \(-\)4.97%. Emphasizing the Coefficient of Determination (R\({}^{2}\)), under the guidance of [PERSON] et al. [84], round 9 presented the best performance, something around 0.937. Accordingly, rounds 8 and 1, 0.932 and 0.931, respectively, ranked second and third, considered high values of predicted values fitting the actual values. The lowest results, in turn, occurred in rounds 3 and 5, where the R\({}^{2}\) achieved were 0.693 and 0.788. The residual analysis of the model played a crucial role in verifying the performance of the regression model in a generalized way, as advocated by [PERSON] et al. [35], given that the residuals represent the difference between the values estimated by the model and the actual observed values. Considering the adverse characteristics contained in the database, it is clear from Figure 6 that the model presented divergent predictions from the actual observed data throughout the training and testing phases, generating residuals that allowed the model to adjust the next predictions from these residuals, increasing its final performance. The distribution of the records in Figure 6 is characterized as a function of the prediction value on the x-axis by the residual error on the y-axis. The smaller the residual error, the more accurate the estimation generated by the model. The blue points refer to the training phase, while the green points refer to the testing phase. \begin{table}
\begin{tabular}{c c} \hline
**Hyperparameters** & **Values** \\ \hline base\_estimator\_iterations & 1000 \\ base\_estimator\_learning\_rate & 0.2 \\ base\_estimator\_depth & 5.0 \\ base\_estimator\_l2\_leaf\_reg & 10.0 \\ base\_estimator\_loss\_function & RMSE \\ base\_estimator\_border\_count & 32.0 \\ base\_estimator\_random\_state & 955.0 \\ base\_estimator & CatBoost Regressor \\ n\_estimators & 10.0 \\ \hline \end{tabular}
\end{table} 
Table 6: Hyperparameters values after optimization implementation. \begin{table}
\begin{tabular}{c c c c c} \hline
**Fold** & **MAE** & **MSE** & **RMSE** & **R\({}^{2}\)** \\ \hline
1 & 294.056 & 261,096 & 510.976 & 0.931 \\
2 & 325.923 & 381,541 & 617.690 & 0.908 \\
3 & 569.990 & 2,726,221 & 1651.127 & 0.693 \\
4 & 237.294 & 465,902 & 682.570 & 0.877 \\
5 & 382.079 & 1,078,487 & 1038.502 & 0.788 \\
6 & 429.818 & 796,458 & 892.445 & 0.791 \\
7 & 271.196 & 219,112 & 468.094 & 0.919 \\
8 & 297.043 & 378,350 & 615.102 & 0.932 \\
9 & 209.607 & 124,925 & 353.447 & 0.937 \\
10 & 261.891 & 339,094 & 582.318 & 0.870 \\ Mean & 327.890 & 677,119 & 741.227 & 0.865 \\ \hline \end{tabular}
\end{table}