# Predictive Analysis for Optimizing Port Operations
## 4 Results
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Model** & **MAE** & **MSE** & **RMSE** & \(\mathbf{R^{2}}\) & **RMSLE** & **MAPE** \\ \hline
**Random Forest** & 5.3336 & 108.9832 & 10.4377 & 0.8241 & 0.2992 & 0.1358 \\ Extra Trees & 5.0287 & 121.0471 & 10.9998 & 0.8046 & 0.3112 & 0.1282 \\ Extreme Gradient Boosting & 7.4763 & 125.7988 & 11.2152 & 0.7969 & 0.3343 & 0.1974 \\ ResNet & 7.4643 & 126.6790 & 11.2551 & 0.7955 & 0.3418 & 0.2033 \\ Neural Network & 7.551 & 127.9665 & 11.3122 & 0.7934 & 0.3547 & 0.2192 \\ Light Gradient Boosting Machine & 8.3872 & 147.0024 & 12.1234 & 0.7627 & 0.3648 & 0.2256 \\ Decision Tree & 5.4081 & 165.8789 & 12.8762 & 0.7322 & 0.3469 & 0.1378 \\ K Nearest Neighbors & 8.1328 & 184.7665 & 13.5920 & 0.7017 & 0.3968 & 0.2074 \\ Gradient Boosting & 10.4030 & 211.0671 & 14.5265 & 0.6593 & 0.4238 & 0.2728 \\ Bayesian Ridge & 11.8099 & 273.8831 & 16.5479 & 0.5579 & 0.4772 & 0.3203 \\ Ridge Regression & 11.8092 & 273.8808 & 16.5479 & 0.5579 & 0.4773 & 0.3202 \\ Linear Regression & 11.8089 & 273.8825 & 16.5479 & 0.5579 & 0.4774 & 0.3201 \\ Elastic Net & 12.8900 & 314.4793 & 17.5318 & 0.4924 & 0.5022 & 0.3847 \\ Lasso Regression & 12.9111 & 315.2336 & 17.7531 & 0.4911 & 0.5023 & 0.3845 \\ Huber Regressor & 12.5049 & 315.4952 & 17.7600 & 0.4907 & 0.5316 & 0.3412 \\ AdaBoost & 18.0348 & 502.1311 & 22.3968 & 0.1889 & 0.6748 & 0.7616 \\ \hline \end{tabular}
\end{table} 
Table 1: Comparing 10-fold CV results of different methods with multiple metrics (sorted using RMSE) for Total Time prediction at port. Figure 3: Random Forest feature importance for Total Time prediction. to reduce the Total Time. Note that for a different sample, some other features might be important. Similar results are observed from Table 2, where the tree-based methods perform better for predicting the Delay Time at the port compared to other methods. Random Forest (RF) again performs the best with an RMSE of 4.2179 followed closely by ResNet. The test set performance for RF gives an RMSE of 4.3707 (other metrics are also in a similar range). From Figure 7, it looks like the predicted and true values are not close to the identity line (\(R^{2}\) is 0.6086). The prediction of Delay Time might be limited by the feature set, as it is known that weather information and other external factors play a key role with respect to delay. Figure 4: SHAP feature analysis plot for Total Time prediction. Figure 5: SHAP decision plot for Total Time prediction of a sample observation. Figure 6: SHAP force plot for Total Time prediction of a sample observation. Figure 8 shows the feature importance for the Delay Time prediction, and it is observed that the Moved Value, VL Weight Containerized Cargo, and Berth are key features, followed by other features like Source, Destination, Month, etc. It is intuitive that vessels with higher Moved Values and VL Containerized Load Weight go through longer operations, leading to a build up in Delay Time. However, some Berths are not run efficiently, which contribute to the delays. The SHAP analysis in Figure 9 shows that the Berth, Source, Month, and Moved Value have the greatest impact on the outcomes of the Random Forest model. This clearly indicates that some Berths, Sources, and Months lead to higher Delay Times. Figures 10 and 11 show the Decision and Force plot for a particular sample with a true Delay Time of 16 h. The predicted value is 15.17, which is very close to the truth. It can be seen that features like Month, Source, and Berth have the most impact towards obtaining the correct output for this sample. For this sample, there is no potential for the outcome to be changed as the top features are fixed unless there is flexibility to change the Month, Source, or Berth.