Group PUMAs by sample rate using entropy-based clustering
entropy_zone_groups.RdGroups PUMAs by balancing sample rates using spectral clustering and information theory. Use to create PUMA groups with similar sample rates and adjacency for weighting.
Usage
entropy_zone_groups(
seed,
targets,
puma_sf,
k_groups = "auto",
balanced = TRUE,
rng_seed = 4321
)Value
data.table with columns:
puma_id— PUMA identifier zone_group— assigned group Rows: one per PUMA. Keys: ( puma_id).
Details
Constructs graph of PUMAs with adjacency and KL divergence weights.
Calculates entropy and information gain for grouping.
Uses spectral clustering on Laplacian matrix to partition graph.
Returns data.table with PUMA IDs and group assignments.
Returns a copy; does not modify by reference.
See also
scripts/weighting/zone_groups.R
Other clustering utilities:
get_kmeans_opt_k(),
kmeans_zone_groups(),
spectral_zone_groups()