Result of Spatex.Region.sa3/3.
labels- cluster of each area, in graph order:0-based and numbered across connected components, or-1for noise (areas in components no larger thanmin_cluster_size, and areas the extraction leaves out). spopt'slabels_uses the same numbering and noise value.n_clusters- number of clusters (noise is not a cluster).n_noise- number of noise areas.n_connected_components- connected components of the graph. Components are clustered separately; one with at mostmin_cluster_sizeareas is all noise.components- one%{nodes: [non_neg_integer()], linkage: [{left, right, distance, size}]}for every component that was clustered, in component order (by lowest area).nodesare the areas in ascending order andlinkageis the scipy-style linkage matrix SA3 extracts from, after spopt's monotonicity correction: leaves are0..length(nodes) - 1(positions innodes), mergeiis nodelength(nodes) + i,distanceis scikit-learn's Ward distance (sqrt(2 * inertia)) andsizethe number of areas merged.
Summary
Types
@type component() :: %{nodes: [non_neg_integer()], linkage: [linkage_row()]}
@type linkage_row() :: {non_neg_integer(), non_neg_integer(), float(), pos_integer()}
@type t() :: %Spatex.Region.Sa3{ components: [component()], labels: [integer()], n_clusters: non_neg_integer(), n_connected_components: pos_integer(), n_noise: non_neg_integer() }