Learn R Programming

SOMbrero (version 1.2)

initGrid: Create an empty Self-Organizing Map structure

Description

Create an empty Self-Organizing Map structure which is a list of 2-dimensional points.

Usage

initGrid(dimension=c(5,5), topo=c("square"), dist.type=c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski", "letremy")) "print"(x, ...) "summary"(object, ...)

Arguments

dimension
Vector of two integer points corresponding to the x dimension and the y dimension. Default values are: (5,5).
topo
The topology to be used to build the grid. Default value is square.
dist.type
The distance type to be used. Default value is euclidean. Type 'letremy' corresponds to the original implementation by Patrick Letremy.
x, object
an object of class myGrid
...
not used

Value

initGrid function returns an object of class myGrid, including the following components: the following components:

References

Letremy, P. (2005) Programmes bases sur l'algorithme de Kohonen et dedies a l'analyse des donnees. SAS/IML programs for 'korresp'. http://samos.univ-paris1.fr/Programmes-bases-sur-l-algorithme.

See Also

See plot.myGrid for plotting a myGrid class object in a graphical window.

Examples

Run this code
# creating a default grid
# default parameters are: 5x5 dimension, squared topology 
# and letremy distance type
initGrid()

# creating a 5x7 squared grid
initGrid(dimension=c(5, 7), topo="square", dist.type="maximum")

Run the code above in your browser using DataLab