Research Article

Improved Vessel Trajectory Prediction Model Based on Stacked-BiGRUs

Algorithm 3

D-KMeans.
(i)Input: Samples to be clustered , sailing radius , the smallest number of vessels in a cluster , number of behaviors
(ii)Output: clustering results
(1)Mark all points in as unvisited//Start DBSCAN clustering
(2)Calculate the matrix , with each cell representing the Mercator distance between each two points
(3)Do
(4) Randomly select an unvisited point
(5) Mark as visited
(6)Initialize
(7)  If there are at least points in field of , then//The mercator distance between two points can be found in the
(8)  Initialize, add to
(9)  Let be the points set in the field of
(10)  For each in
(11)   If is unvisited, then
(12)   Mark as visited
(13)   If there are at least points in the field of , then
(14)   Add points to
(15)  End If
(16)  If is not a member of any cluster, then
(17)    Add to
(18)   End If
(19)  End If
(20)End For
(21) Add to
(22)Else mark as noise point
(23)End If
(24)Until all the points are marked, //DBSCAN clustering is complete
(25)Compute the average speed set of each in
(26)Select points as the initial center point: //Start KMeans clustering
(27)Do
(28)Initialize
(29)For in do
(30)  Compute the speed difference between and
(31)  The cluster label of was determined according to the nearest cluster center
(32)  Add to the nearest cluster:
(33)  For do
(34)   Compute the new cluster center:
(35)  If, then
(36)    Update as the cluster center
(37)   End If
(38)  End For
(39)End For
(40)Until the update of all clusters is complete//KMeans clustering is complete
(41)Return //Behavior classification is complete