5.2 REDCAP
Regionalization with dynamically constrained agglomerative clustering and partitioning (REDCAP) is developed by D. Guo (2008). Like SKATER, REDCAP starts from building a spanning tree in 4 different approaches (single-linkage, average-linkage, complete-linkage, and wards-linkage). Then, REDCAP provides 2 different approaches (firstβorder and full-order constraining) to prune the tree to find clusters. The REDCAP with first-order approach using a minimum spanning tree is exactly the same as SKATER. For more information, please read https://geodacenter.github.io/workbook/9c_spatial3/lab9c.html#redcap
redcap()
Synopsis
Short version 1:
integer redcap(integer k, anyarray vals, bytea weights,
character varying method
)
Short version 2:
integer skater(integer k, anyarray vals, bytea weights,
character varying method, integer min_region_size
)
Short version 3:
integer redcap(integer k, anyarray vals, bytea weights,
character varying method, numeric bound_vas, float min_bound
)
Full version 1:
integer redcap(integer k, anyarray vals, bytea weights,
character varying method, integer min_region_size,
character varying scale_method,
character varying distance_type,
integer seed,
integer cpu_threads)
Full version 2:
integer redcap(integer k, anyarray vals, bytea weights,
character varying method, numeric bound_val, float min_bound,
character varying scale_method,
character varying distance_type,
integer seed,
integer cpu_threads)
Arguments
Name
Type
Description
k
integer
the number of clusters
vals
anyarray
an array of the numeric columns that contains the values for skater
weights
bytea
a bytea column that stores the spatial weights information
method
character varying
the redcap method. Options are {"firstorder-singlelinkage", "fullorder-completelinkage", "fullorder-averagelinkage","fullorder-singlelinkage", "fullorder-wardlinkage"}
bound_val
numeric
the numeric column of a bound variable
min_bound
float
the minimum bound value that applies to all clusters
scale_method
character varying
the scaling method applies to vals. Options are {'raw', 'standardize', 'demean', 'mad', 'range_standardize', 'range_adjust'}. Default: 'standardize'
distance_method
character varying
the distance metric used to measure the distance in attribute space of input vals. Options are {'euclidean', 'manhattan'. Default: 'euclidean'.
seed
integer
the seed for random number generator used in LISA statistics. Default: 123456789.
cpu_threads
integer
the number of CPU threads used for parallel LISA computation. Default: 6.
Return
Type
Description
integer
the cluster indicator
Examples
Apply redcap (fullorder-completelinkage) to create 10 spatially constrained clusters using variable ["hr60", "ue60", "dv60"] (homicide, unemployment, divorce rate 1960 in natregimes dataset) and queen contiguity weights "queen_w":
SELECT redcap(10, ARRAY[hr60, ue60, dv60], queen_w, 'fullorder-completelinkage') OVER() FROM natregimes;
redcap
--------
2
2
1
2
1
3
2
...
Last updated
Was this helpful?