It is common to further cluster the GeoSOM map into superclasses, groups of cells with similar profiles. This is done using classic clustering algorithms on the map’s prototypes.Remeber to use it when the non-spatial variable is more than 1.
Arguments
- gsom
A
kohonen
object,get fromgeosom()
.- k
The number of superclasses.
- method
(optional)The clustering algorithms used on the map’s prototypes,two methods are implemented in
spEcula
, PAM(k-medians) and hierarchical clustering.When method ispam
,PAM (k-medians) is used,otherwise hierarchical clustering.Default ispam
.- hmethod
For hierarchicical clustering, the clustering method, by default "complete". See the
stats::hclust
documentation for more details.- bindcoord
Does the cluster of superclass in GeoSOM consider spatial coordination. Defaul is
FALSE
.
Author
Wenbo Lv lyu.geosocial@gmail.com
Examples
data(pmc)
set.seed(2004)
g = geosom(data = pmc, coords = c("centroidx","centroidy"),
wt = 3,grid = geosomgrid(6,10),normalize = TRUE)
g_superclass = geosom_superclass(g,12)
g_superclass
#> [1] 1 2 1 3 4 5 3 1 1 3 4 4 6 3 3 4 7 7 6 6 6 4 7 7 6
#> [26] 8 8 9 9 7 6 6 8 9 9 9 1 8 8 10 10 9 11 12 10 10 10 9 12 12
#> [51] 10 10 9 9 8 10 10 10 9 9