# Near-Optimal Weather Routing by Using Improved A* Algorithm
## 4 Case Study
### Prediction of Ship's Estimated Time of Arrival
#### 4.1.3 Learning-Based Regression Model
Thus, UV and VV factors mean the velocities in the directions of 90\({}^{\circ}\) and 0\({}^{\circ}\) corresponding to the \(x\)-axis and \(y\)-axis, respectively. The velocity and the direction are defined using Equations (10) and (11) as follows. \[v=\sqrt{UV^{2}+VV^{2}} \tag{10}\]  
\[\theta= \begin{cases}atan2(UV,VV),&if\ atan2(UV,VV)\geq 0\\ 360+\frac{180}{n}atan2(UV,VV),&otherwise\end{cases}  \tag{11}\]  
In this study, the latitude and longitude were not considered as candidate features because they only serve to filter abnormal data in data preprocessing and are unnecessary factors for predicting the SOG. In other words, the positional information can be used to obtain the weather information at a specific location, but it does not directly affect the SOG. However, because the weather-related features have a direct effect on the SOG, they must be considered as candidate features. In general, when a ship arrives or departs from a port, it often changes its heading direction significantly from its low-speed operation, thus having a high ROT value. However, in this study, route optimization is performed at high speed operating conditions, so ROT is often near zero and therefore is excluded from the candidate features for SOG prediction, and significant ROT values were already filtered by limiting SOG values to more than 5 knots during preprocessing. Next, gross tonnage data were added to the candidate features and could be obtained by referring to the specifications of each vessel. The gross tonnage represents the volume of a vessel, and 1 volume tonnage corresponds to a volume of 1.133 m\({}^{3}\). Because all vessels have their unique gross tonnage values, they can be used as important factors to categorize each vessel in the learning model and can represent vessel dimensional information, such as length and width. Because the gross tonnage already includes the vessel dimensional information, dimension A-D information in the static AIS dataset was excluded from the candidate features. Table 6 shows the list of candidate features. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Variable Type** & **No.** & **Parameter** & **Unit** & **Remark** \\ \hline  & 1 & COG & deg \\  & 2 & Draught & m \\ \hline  & 3 & Total wave height & m \\  & 4 & Total wave direction & deg \\  & 5 & Total wave period & sec \\  & 6 & Wind wave height & m \\  & 7 & Wind wave direction & deg \\  & 8 & Wind wave period & sec \\  & 9 & Swell wave height & m \\ Explanatory & 10 & Swell wave direction & deg \\  & 11 & Swell wave period & sec \\  & 12 & Pressure MSL & m/s \\  & 13 & Pressure surface & m/s \\  & 14 & Ambient temperature & hPa \\  & 15 & Sea surface salinity & hPa \\  & 16 & Sea surface temperature & \({}^{\circ}\)C \\ \hline  & 17 & Wind speed & m/s \\  & 18 & Wind angle & deg \\  & 19 & Current speed & m/s \\  & 20 & Current angle & deg \\ \hline  & 21 & Gross tonnage & tons & Additional \\ \hline Response & 1 & SOG & knots & AIS \\ \hline \hline \end{tabular}
\end{table} 
Table 6: List of candidate explanatory variables. Before generating the learning model, it is important to ensure that multicollinearity exists within the explanatory variables. Multicollinearity indicates the presence of linear dependencies among the explanatory variables, which causes the variance of the regression coefficient to increase, resulting in a decrease of the accuracy of the regression model. To resolve this problem, Variance Inflation Factor (VIF) analysis is widely used, which is an indicator of how well a particular explanatory variable can be described through ordinary least squares regression analysis with the remaining explanatory variables. The formula to determine VIF is as follows. \[\mathit{VIF}_{k}=\ \frac{1}{1-R_{k}^{2}} \tag{12}\]  
where \(\mathit{VIF}_{k}\) is the VIF value of the \(k\)th explanatory variable and \(1\leq k\leq n\) when \(n\) explanatory variables are given. Thus, when an explanatory variable highly depends on other variables, it has a high VIF value. Otherwise, it has a low VIF value.