cluster.representatives {SOMMD} | R Documentation |
Cluster Representatives
Description
Compute the cluster representatives
Usage
cluster.representatives(SOM, clusters)
Arguments
SOM |
a kohonen SOM object. |
clusters |
a vector of clusters assignment for each neuron, as returned for example by hclust. |
Value
A vector of frames representatives of each neuron
Author(s)
Stefano Motta stefano.motta@unimib.it
Examples
#Read example SOM data
som_model <- readRDS(system.file("extdata", "SOM_HIFa.rds", package = "SOMMD"))
# Divide the SOM in the selected number of clusters
som_cl <- cutree(hclust(dist(som_model$codes[[1]], method="euclidean"), method="complete"), 4)
#Get representative frames for each cluster
cl_repres <- cluster.representatives(som_model, som_cl)
[Package SOMMD version 0.1.2 Index]