The screeplot, helps deciding the optimal number of superclasses. Available
for both PAM(pam
) and hierarchical clustering(hclust
).
Usage
geosom_bestsuperclass(
gsom,
nclass = 2,
method = "pam",
hmethod = "complete",
bindcoord = FALSE
)
Arguments
- gsom
kohonen
object, a SOM created by thespEcula::geosom
function.- nclass
number of superclasses to be visualized in the screeplot. Default is 2.
- method
Method used for clustering. Hierarchical clustering ("hclust") and Partitioning around medoids ("pam") can be used. Default is Partitioning around medoids.
- 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
.
Examples
if (FALSE) {
data(pmc)
set.seed(2004)
g = geosom(data = pmc, coords = c("centroidx","centroidy"),
wt = 3,grid = geosomgrid(6,10),normalize = TRUE)
geosom_bestsuperclass(g)
}