Analysis of Key Commuting Routes Based on Spatiotemporal Trip Chain
Algorithm 1
DBSCAN algorithm.
Input: Similarity matrix Ws, a pre-defined parameter minpts, a pre-defined parameter eps.
Output: Cluster set C = {C0,…, Ck}
Algorithm steps:
(1)
Traverse all objects to get the core points set Ω, if Ω is an empty set, clustering cannot be performed; otherwise, proceed to the next step;
(2)
Set k = 0, mark all samples as unvisited, randomly select a core point p and set it as visited, initialize the queue Q = <p>;
(3)
Take out the elements in the queue Q in turn until Q becomes an empty queue, if the element is a core point, add the unvisited object in its eps neighborhood to the queue Q;
(4)
Generate the cluster Ck, which includes all the objects that have changed from unvisited to visited this time, k = k + 1;