Description Usage Arguments Value Author(s) References Examples
The function plots hexagonal self-organising maps (SOMs), which have been created with Teuvo Kohonen's SOM_PAK software.
The plot shows an hexagonal lattice representing the codebook vectors of the SOM. Inside each hexagon a pie chart is drawn, showing the relative percentage of pattern classes, mapped to this codebook vector. The size of each pie chart is adjusted according to the number of mapped patterns.
Several arguments allow customisation of size, scale and colouring of the plot.
The function needs two files of the SOM_PAK file set:
The output of visual
provides
the mapping of input patterns to the codebook vectors.
The input file holding the mapped dataset with class information in the last column.
1 |
visfile |
Name of the output file of |
datfile |
Name of the SOM_PAK input file. This files contains all input patterns and
class information for each pattern. |
... |
Many other arguments can be given to control the appearence of the plot: ‘col’, default colours for the classes of the dataset. Possible values include: ‘default value: NA.’ Colours are generated by ‘vector’ of colour definitions ‘data frame’ with name of a class in column 1 and colour definitions in column 2. If the number of defined colours is smaller then the number of classes
in the dataset, colours for the remaining classes are generated
by ‘onlyDefCols’ default: FALSE; if TRUE, all undefined colours are replaced by white ‘edit.cols’ default: FALSE; if TRUE, a dialog box opens and allows editing of all color definitions ‘show.legend’ default: TRUE; defines if colour legend is displayed ‘legend.width’ default: 4; Width of legend ‘turn’ default: FALSE; swap X and Y axis ‘window.width’ default: NA; width of the window ‘window.height’ default: NA; height of the window ‘show.box’ default: TRUE; show frame around the plot ‘show.axis’ default: FALSE; show x and Y axis ‘scaleX’ default: NA; scale factor for X axis (overwrites new.xdim argument) ‘scaleY’ default: NA; scale factor for Y axis (overwrites new.ydim argument) ‘scale’ default: NA; scale factor for X and Y axis (overwrites other scale argument) ‘new.xdim’ default: NA; scale X axis to specified number of neurons ‘new.ydim’ default: NA; scale Y axis to specified number of neurons ‘show.counter.border’ default: 0.98 percentile as limit for the display of labels in the pie charts |
The function does not returns a value.
Benjamin Schulz, Andreas Dominik
Schulz, B., Mauthe, T., Dominik, A., 2010. Visualisation of Kohonen Maps using R. THM University of Applied Sciences, Giessen, Germany Website, [Online]. Available at: http://www.life-science-it.org/pages/research/projectSomplot.html [Accessed 19 May 2011]. and http://www.bioconductor.org/packages/2.5/bioc/html/hexbin.html
1 2 | som.plot(system.file("test.data/iris4som.out", package="somplot"),
system.file("test.data/iris4som.dat", package="somplot"))
|
Loading required package: hexbin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.