View source: R/cluster.representatives.R
cluster.representatives | R Documentation |
Compute the cluster representatives
cluster.representatives(SOM, clusters)
SOM |
a kohonen SOM object. |
clusters |
a vector of clusters assignment for each neuron, as returned for example by hclust. |
A vector of frames representatives of each neuron
Stefano Motta stefano.motta@unimib.it
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.