cluster analysis - Mapping data to an SOM in R -


i conducting data analysis on data in r. discovered self-organizing maps (som) , seems quite depict link among data. tried both "kohonen" , "som" libraries. however, not able map data onto created som. instance, here picture found in som tutorial data (here, countries) mapped onto som. can not figure out either how extract information different nodes som object created 1 of 2 libraries listed above.

does know how ?

enter image description here

edit:

some data , code example (using "kohonen" package):

library(kohonen) # wines = dataset kohonen library. has 76 examples 13 criteria. som_grid <- somgrid(xdim=5, ydim=5, topo="hexagonal") som_model <- som(wines, grid=som_grid) plot(som_model) 

enter image description here

this code shows number of items in each node of som:

plot(som_model,type="counts",palette.name=coolbluehotred) 

enter image description here

if want see value of first criteria nodes of som:

var <- 1 var_unscaled <- aggregate(as.numeric(wines[,var]),by=list(som_model$unit.classif),fun=mean,simplify=true)[,2] plot(som_model,type="property",property=var_unscaled,main=names(wines)[var]) 

enter image description here

i create map first image, meaning som name of each variable mapped closest node of som.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -