## 3 Methodology
### Dynamic Feature Samples Construction  
For \(d^{in}_{l+1}\) in \(T^{in}\), add the features in Equation (7) into \(d^{in}_{j+1}\), then \(d^{in}_{j}\) is redefined as Equation (8). For \(d^{i}_{0}\) in \(T^{i}\), the supplementary features of \(d^{in}_{0}\) defined by Equation (7) take the same value as those in \(d^{in}_{0}\) except that \(\delta t^{in}_{0}\), \(\delta lng^{in}_{0}\), \(\delta lat^{in}_{0}\), \(\delta COG^{in}_{0}\), and \(\delta SOG^{in}_{0}\) take the value zero.  
\[\left\{\begin{array}{c}\delta t^{in}_{l+1}=time^{in}_{j+1}-time^{in}_{j}\\ \delta lng^{in}_{j+1}=lng^{in}_{j+1}-lng^{in}_{j}\\ \delta lat^{in}_{j+1}=lat^{in}_{j+1}-lat^{in}_{j}\\ \delta COG^{in}_{j+1}=COG^{in}_{j-1}-COG^{in}_{j}\\ ROT^{in}_{j+1}=\delta COG^{in}_{j+1}/\delta t^{in}_{j+1}\\ \delta SOG^{in}_{j+1}=SOG^{in}_{j+1}-SOG^{in}_{j}\\ accelerate^{in}_{j+1}=\delta SOG^{in}_{j+1}/\delta t^{in}_{j+1}\\ speedIng^{in}_{j+1}=\delta lng^{in}_{j+1}/\delta t^{in}_{j+1}\\ speedIng^{in}_{j+1}=\delta lat^{in}_{j+1}/\delta t^{in}_{j+1}\\ speedIng^{in}_{j+1}=\delta lat^{in}_{j+1}/\delta t^{in}_{j+1}\\ speedIng^{in^{\prime}}_{j+1}=\left(speedIng^{in^{\prime}}_{j+1}+speedIng^{in^{ \prime}}_{j+1}\right)^{-2}\\ \end{array}\right. \tag{7}\]  
\[\begin{array}{c}d^{in}_{j}=[time^{in}_{j},lng^{in}_{j},lat^{in}_{j},SOG^{in}_ {j},COG^{in}_{j},ROT^{in}_{j},\delta t^{in}_{j},\delta lng^{in}_{j},\delta lat^{in}_ {j},\delta COG^{in}_{j},ROT^{in}_{j},\\ \delta SOG^{in}_{j},accelerate^{in^{\prime}}_{j},speedIng^{in^{\prime}}_{j}, speedIng^{in^{\prime}}_{j},speedIng^{in^{\prime}}_{j},speedIng^{in^{\prime}}_{j} )^{\mathsf{T}}\\ \end{array} \tag{8}\]  
We add the features above into \(d^{i}_{j+1}\) for the following reasons. The time interval \(\delta t\) is associated with ships' motion state [4] in Table A1. [PERSON] et al. [26] and [PERSON] et al. [19] pointed out that AIS equipment installed on different types of ships is of various cost and performance (e.g., fishing boats tend to install AIS equipment with low cost and accuracy), which may lead to the deviation of _COG_, _SOG_, _ROT_ and other kinematic information. Considering the situation mentioned above, we calculate _ROT\({}^{\prime}\)_, _accelerate\({}^{\prime}\)_, _speeding\({}^{\prime}\)_, _speedalat\({}^{\prime}\)_, and _speed\({}^{\prime}\)_. Although the supplementary dynamic features may be redundant for ship motion state description, they can improve the anti-noise capability of the classifier.  
As shown in Figure 7, we describe the trajectory \(T^{in}\) from three aspects, which are \(DFD^{in}\), \(TS^{in}\), and \(TS^{in}\). \(DFD^{in}\) is the distribution of the dynamic feature of \(T^{in}\), which can reflect the overall motion characteristics of \(T^{in}\). \(TS^{in}\) is the set of sub-trajectories (e.g., \(TS^{in}_{N}\)) obtained from \(T^{in}\), which reflects the short-term time series characteristics of \(T^{in}\). \([x_{1},x_{2},\ldots,x_{k}]^{inT}_{n}\) in \(TS^{in}\) is a feature vector extracted from \(TS^{in}_{n}\), which reflects the short-term characteristics of \(T^{in}\). Each element in \([x_{1},x_{2},\ldots,x_{k}]^{inT}_{n}\) is a different feature  
Figure 6: Distribution of original static data and the data after removing outliers. (**a**) Violin plot of passenger ships’ static features; (**b**) Violin plot of passenger ships’ static features (after removing outliers); (**c**) Violin plot of four types of ships’ static features; (**d**) Violin plot of four types of ships’ static feature (after removing outliers).  
calculated from \(TS_{n}^{in}\), e.g., \(x_{1}\) can be the average longitude of \(TS_{n}^{in}\). \(TS^{in}\) and \(TSF^{in}\) are defined as Equations (9) and (10).  
\[\left\{\begin{array}{c}TS_{n}^{in}=\left\{TS_{1}^{in},TS_{2}^{in},\ldots,TS_{ n}^{in}\right\}\\ TS_{n}^{in}=[d_{j}^{in},d_{j+1}^{in},\ldots,d_{j+k}^{in}]\end{array}\right. \tag{9}\]  
\[\left\{\begin{array}{c}TSF^{in}=\left\{TSF_{1}^{in},TSF_{2}^{in},\ldots,TSF_{ n}^{in}\right\}\\ TSF_{n}^{in}=[x_{1},x_{2},\ldots,x_{k}]_{n}^{in\top}\end{array}\right. \tag{10}\]