powered by
First Hierarchy Function
first_hierarchy(data, numK, limitsSeparation, maxDist, kmeans_pp = FALSE)
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
Initial number of clusters in the first call of k-means in the global hierarchy.
Within cluster distance threshold to determine if a global cluster must be separated into two new clusters.
Meter distance threshold used to re-estimate centroids in global hierarchy.
Boolean value, if TRUE it initialize centroids using kmeans++.
data(ODMeansTaxiData) first_hierarchy_data = first_hierarchy(ODMeansTaxiData, 10, 300, 1000)
Run the code above in your browser using DataLab