powered by
Second Hierarchy Clusters
second_hierarchy( data, Kcluster, distHierarchical, numKLocal, limitSeparationLocal, maxDistLocal )
Returns an S3 class object similar to kmeans S3 Class, with eight properties.
A data frame with four columns: Initial Latitude | Initial Longitude | Final Latitude | Final Longitude
An ODMeans structure, result of function first_hierarchy.
Meter distance threshold between origin and destination to generate new local clusters from a first layer cluster.
Initial number of clusters in the first call of k-means in the local hierarchy.
Within cluster distance threshold to determine if a local cluster must be separated into two new clusters.
Meter distance threshold used to re-estimate centroids in local hierarchy.
data(ODMeansTaxiData) first_hierarchy_data = first_hierarchy(ODMeansTaxiData, 10, 500, 1000) second_hierarchy_data = second_hierarchy(ODMeansTaxiData, first_hierarchy_data, 2200, 3, 50, 100)
Run the code above in your browser using DataLab