# A Pilot Study of Stacked Autoencoders for Ship Mode Classification
## 5 Experimental Results and Discussion
### Discussion  
Performance by Model Structure and Latent Size  
This section discusses the importance of the findings of this study. First, we focused on model structure, which was found to affect the classification performance: the (5-128) structure gave the best results. This less complex model structure (5-128) had a better performance result than more complex model structures (7-64, 7-128).  
Second, we investigated the effect of latent size on model performance. We found that the performance of the model increased with latent size up to a certain point and declined after that point. Hence, finding the appropriate latent size can improve performance even when a model's structure is fixed.  
Through this study, several limitations of the variational autoencoder (VAE) model were identified. First, the proposed VAE model utilizes only container vessel data. These data may differ from those obtained from other types of ships, such as LNG ships and bulk ships. This pilot study focused on performing comparative experiments using confusion matrices and evaluation metrics to evaluate the ship state classification performance according to changes in the parameters of VAE models using actual ship data. Therefore, the direct discussion that is possible based on the current results is limited. In order to improve  
\begin{table}
\begin{tabular}{c c c c} \hline  & **In Port** & **Stand by** & **At Sea** \\ \hline In port & 1048 & 35 & 0 \\ Stand by & 40 & 329 & 20 \\ At sea & 0 & 140 & 4456 \\ Correct & 0.9632 & 0.6527 & 0.9955 \\ Incorrect & 0.0367 & 0.3472 & 0.0044 \\ \hline \end{tabular}
\end{table}
Table 13: Confusion matrix of (5–128) structure with a latent layer size of 9.  
\begin{table}
\begin{tabular}{c c c c} \hline  & **In Port** & **Stand by** & **At Sea** \\ \hline In port & 1060 & 54 & 0 \\ Stand by & 28 & 299 & 7 \\ At sea & 0 & 151 & 4469 \\ Correct & 0.9742 & 0.5932 & 0.9984 \\ Incorrect & 0.0257 & 0.4067 & 0.0015 \\ \hline \end{tabular}
\end{table}
Table 14: Confusion matrix of (7–64) structure with a latent layer size of 12.  
\begin{table}
\begin{tabular}{c c c c} \hline  & **In Port** & **Stand by** & **At Sea** \\ \hline In port & 1043 & 44 & 0 \\ Stand by & 45 & 308 & 12 \\ At sea & 0 & 152 & 4464 \\ Correct & 0.9586 & 0.6111 & 0.9973 \\ Incorrect & 0.0413 & 0.3888 & 0.0026 \\ \hline \end{tabular}
\end{table}
Table 15: Confusion matrix of (7–128) structure with a latent layer size of 6.  
the performance of the ship state classification model in the future, a comparative study with deep learning-based classification models using various structures that are currently used in other fields is needed.  
Second, we found that the classification performance for the Stand By state was low. The model is affected by the balance of data, and the quantity of data for the Stand By state was very small in this study. This class imbalance problem can be solved in three ways: data-level, algorithm-level, and hybrid methods [37]. Data-level methods apply various data sampling methods that try to create balanced, distributed data for the training dataset. The cost-sensitive approaches focus on diminishing the bias toward major groups [38]. Hybrid methods combine the benefits of the previous two types of methods and minimize their weaknesses to improve classification model performance [39]. By adopting these methods, the problem of imbalanced data can be solved.  
In the commercial realm, no algorithm has been presented that can automatically classify current ship states. However, as research on smart ships, reducing ship fuel consumption, and eco-friendly algorithms is conducted, the VAE model proposed in this pilot study can provide ship state-applied ship data to smart ship researchers. In addition, research can be conducted on reducing ship fuel consumption and improving eco-friendliness using the characteristics of the ship's state.