# Analysis of Trends in Mega-Sized Container Ships Using the K-Means Clustering Algorithm
## 2 Materials and Methods
### Analysis Method and Coverage Rate Concept  
Usually, there are ships of the same tonnage but with slightly different main dimensions. This is because the characteristics desired by the shipping company can be achieved with various combinations of dimensions. The regression analysis related to the ship's main dimensions can be divided into three types, and regression analysis suitable for each type must be applied [9]. The first type is logarithmic regression analysis. Ships of the same category are generally spatially similar regardless of their size; thus, their main dimensions are approximately proportional to the \(\frac{1}{3}\) (0.33%) power of their size. The relationship between the main dimensions is calculated by the following equation:  
\[y=\alpha x^{\beta} \tag{1}\]  
where \(y\) denotes the main dimensions (LOA, Lpp, B, d), and \(x\) is the tonnage variables (DWT, GT). The shape of this graph is presented in Figure 3.  
Equation (1) is changed to Equation (2) by transforming both sides into logarithms to make it easy to perform statistical analysis, such as calculating the simple linear regression equation and the standard differential:  
\[\log y=\log\alpha+\beta\log x \tag{2}\]  
where \(\alpha\) denotes the y-intercept value log-transformed graph, and \(\beta\) is the slope of the log-transformed graph (Equations (1) and (2)). The log-transformed graph takes the form of a linear graph, as illustrated in Figure 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Data** & **Raw Data** & **Acquired Data** & **Outlier \& Missing Value** \\
**Preprocessing** & & & **Treatment** \\ \hline Count & 7791 & 7730 & 5497 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Results of data preprocessing. Figure 3: Logarithmic regression analysis graph. The second type of regression analysis is average value analysis. The graph of the major specifications of a ship is generally in the form of a logarithmic regression graph, but some have a form in which certain specifications remain constants. The reason for this is that ships are designed according to the width of the navigation passageway, the water depth of the pier, and the length of the berth. The relationship between the main dimensions and the ship size is calculated by the following equation:  
\[y=\left\{ \begin{array}{l}\alpha_{0},\ \mathrm{P1}\leq x<\mathrm{P2}\\ \alpha_{1},\ \mathrm{P2}\leq x<\mathrm{P3}\end{array} \right. \tag{3}\]  
where \(\alpha_{0}\) is the \(y\)-intercept value when \(\mathrm{P1}\leq x<\mathrm{P2}\), and \(\alpha_{1}\) is the \(y\)-intercept value when \(\mathrm{P2}\leq x<\mathrm{P3}\). \(P_{n}(n=1,2,3)\) is the different values of \(x\). The slope of the target interval is 0. The shape of the graph is displayed in Figure 5.  
The third type of regression analysis is linear regression analysis. This type of analysis is a simple regression graph expressed in the form of a general linear graph; herein, it was used to derive the relationship between the TEU and DWT. The relationship between the main dimensions and the ship size is calculated by the following equation:  
\[\mathrm{y}=\alpha x+\beta \tag{4}\]  
where, \(x\) denotes the DWT, \(y\) denotes the TEU, \(\alpha\) is the slope, and \(\beta\) is the \(y\)-intercept. In this study, \(\beta\) was set to 0 because when \(\beta\) is negative, the \(\mathrm{y}\) value can be obtained (\(-\)) if \(\alpha x\) is smaller than the absolute value of \(\beta\). The graph is presented in Figure 6.  
Figure 4: Linear regression analysis graph (log-transformed). Figure 5: Average value analysis graph. The reliability obtained through regression can be obtained using the adjusted R-squared value of the log transformation graph. In the case of a graph with a slope of 0, the accuracy can be judged according to the degree of the standard deviation of the residuals. The regression analysis results were the average ship's main dimensions (50% of residual distribution), but average values do not represent the dimensions of the entire ship.