Learn R Programming

SOMbrero (version 1.2-4)

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"))
# S3 method for myGrid
print(x, ...)
# S3 method for myGrid
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:

coord

A two columns matrix which provides the coordinates of the points of the Self-Organizing Map structure,

topo

Same value as the arguments given to initGrid function,

dim

Same values as the arguments given to initGrid function.

dist.type

Same value as the arguments given to initGrid function.

References

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

See Also

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

Examples

Run this code
# NOT RUN {
# 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