Spatially constrained hierarchical clustering is a special form of constrained clustering, where the constraint is based on contiguity (common borders). The method builds up the clusters using agglomerative hierarchical clustering methods: single linkage, complete linkage, average linkage and Ward’s method (a special form of centroid linkage). Meanwhile, it also maintains the spatial contiguity when merging two clusters.
schc()
function schc(
WeightResult w,
Number k,
Array vals,
Number min_bound,
Array bound_vals,
String scale_method,
String distance_type)
Arguments
Name
Type
Description
weights
WeightsResult
The weights object WeightsResult
k
Number
The number of clusters
values
Array
The list of numeric vectors of selected variable
method
String
The method of agglomerative hierarchical clustering: {“single”, “complete”, “average”,”ward”}.
min_bound
Number
The minimum value that the sum value of bounding variable int each cluster should be greater than
bound_vals
Array
The numeric vector of selected bounding variable
scale_method
String
The scaling method: {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}
distance_method
String
The distance method: {"euclidean", "manhattan"}
Return
Type
Description
ClusteringResult
The Clustering object: {'total_ss', 'within_ss', 'between_ss', 'ratio', 'clusters'}