second_hierarchy {ODMeans}R Documentation

Second Hierarchy Clusters

Description

Second Hierarchy Clusters

Usage

second_hierarchy(
  data,
  Kcluster,
  distHierarchical,
  numKLocal,
  limitSeparationLocal,
  maxDistLocal
)

Arguments

data

A data frame with four columns:
Initial Latitude | Initial Longitude | Final Latitude | Final Longitude

Kcluster

An ODMeans structure, result of function first_hierarchy.

distHierarchical

Meter distance threshold between origin and destination to generate new local clusters from a first layer cluster.

numKLocal

Initial number of clusters in the first call of k-means in the local hierarchy.

limitSeparationLocal

Within cluster distance threshold to determine if a local cluster must be separated into two new clusters.

maxDistLocal

Meter distance threshold used to re-estimate centroids in local hierarchy.

Value

Returns an S3 class object similar to kmeans S3 Class, with eight properties.

Examples

data(ODMeansTaxiData)
first_hierarchy_data = first_hierarchy(ODMeansTaxiData, 10, 500, 1000)
second_hierarchy_data = second_hierarchy(ODMeansTaxiData, first_hierarchy_data, 2200, 3, 50, 100)

[Package ODMeans version 0.2.1 Index]