# Predictive Analysis for Optimizing Port Operations
## 4 Results
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Model** & **Accuracy** & **AUC** & **Recall** & **Precision** & **F1** & **Kappa** \\ \hline
**Extreme Gradient Boosting** & **0.8424** & 0.9716 & 0.8424 & 0.8426 & 0.8424 & 0.7797 \\ Extra Trees & 0.8386 & 0.9453 & 0.8386 & 0.8386 & 0.8386 & 0.7743 \\ Random Forest & 0.8360 & 0.9634 & 0.8360 & 0.8361 & 0.8360 & 0.7707 \\ Decision Tree & 0.8220 & 0.8775 & 0.8220 & 0.8219 & 0.8219 & 0.7511 \\ ResNet & 0.8165 & 0.8503 & 0.8165 & 0.8168 & 0.8166 & 0.7785 \\ Neural Network & 0.8108 & 0.8369 & 0.8108 & 0.8111 & 0.8109 & 0.7628 \\ Light Gradient Boosting Machine & 0.7978 & 0.9518 & 0.7978 & 0.7981 & 0.7977 & 0.7165 \\ Gradient Boosting & 0.7210 & 0.9051 & 0.7210 & 0.7235 & 0.7190 & 0.6046 \\ K Nearest Neighbors & 0.7160 & 0.8962 & 0.7160 & 0.7171 & 0.7156 & 0.6009 \\ Linear Discriminant Analysis & 0.6344 & 0.8353 & 0.6344 & 0.6355 & 0.6281 & 0.4788 \\ Ridge Classifier & 0.6296 & 0.8194 & 0.6296 & 0.6355 & 0.6117 & 0.4661 \\ Logistic Regression & 0.5997 & 0.8135 & 0.5997 & 0.6183 & 0.5626 & 0.4212 \\ Ada Boost & 0.5511 & 0.7245 & 0.5511 & 0.5447 & 0.5457 & 0.3687 \\ SVM & 0.5412 & 0.7749 & 0.5412 & 0.5808 & 0.5159 & 0.3382 \\ Naive Bayes & 0.5342 & 0.7675 & 0.5342 & 0.5769 & 0.5136 & 0.3538 \\ Quadratic Discriminant Analysis & 0.3429 & 0.7174 & 0.3429 & 0.4488 & 0.2962 & 0.1611 \\ \hline \end{tabular}
\end{table} 
Table 3: Comparing 10-fold CV results of different methods with multiple metrics (sorted using Accuracy) for Total Time classification at port. Figure 12: Confusion matrix on test data for Total Time classification. The SHAP analysis illustrated in Figure 14 demonstrates that features such as Berth, Destination, Moved Value, and Month have the most significant impact on the outcomes of the XGBoost model. Each sample will have four Decision and Force plots, one for each class since the sample considered has a class of 1, the shared plots are of Class 1. Figures 15 and 16 present the Decision and Force plots for Class 1 for a particular sample with a true Total Time class as 1 (Medium). The model output is 1.64, which is the highest among the four classes and hence this sample is correctly classified as class 1. These plots reveal that features like Berth, Destination, and Moved Value play a crucial role in producing the accurate classification for this specific sample. Reducing the Moved Value for this sample should push it towards Class 0 (Low), which intuitively makes sense but may not be feasible. Table 4 presents the binary classification task performance for Delay Time. The tree-based methods again outperform other approaches in most of the metrics. XGBoost gives the best performance by achieving the highest Accuracy (0.9511) and best values across the different metrics compared to other methods. It achieves an accuracy of 0.9505 on the test set and other metrics showing close performance, as illustrated by the confusion matrix in Figure 17. The higher performance for Delay Time compared to Total Time is because the task is simpler, as here, the classification is binary compared to four classes for Total Time. Furthermore, Figure 18 highlights the key features influencing Delay Time classification, factors such as Flag Long Course, Flag Cabotage, Owner's Nationality, and Type of Mooring Navigation (Long Haul) emerge as the most influential. This is followed by variables like Port Complex, Load Operation Type, ST Cargo Nature, and Month. Features related to operation characteristics have the most impact on the Delay Class. Figure 14: SHAP feature analysis plot for Total Time classification. Figure 13: Random Forest feature importance for Total Time classification. Figure 16: SHAP force plot of a sample observation for Class 1.