initGrid {SOMbrero} | R Documentation |
Create an empty grid
Description
Create an empty (square) grid equipped with topology.
Usage
initGrid(
dimension = c(5, 5),
topo = c("square", "hexagonal"),
dist.type = c("euclidean", "maximum", "manhattan", "canberra", "minkowski", "letremy")
)
Arguments
dimension |
a 2-dimensional vector giving the dimensions (width, length) of the grid |
topo |
topology of the grid. Accept values |
dist.type |
distance type that defines the topology of the grid (see
'Details'). Default to |
Details
The units (neurons) of the grid are positionned at coordinates
(1,1), (1,2), (1,3), ..., (2,1), (2,2), ..., for the square
topology.
The topology of the map is defined by a distance based on those coordinates,
that can be one of "euclidean"
, "maximum"
, "manhattan"
,
"canberra"
, "minkowski"
, "letremy"
, where the first 5
ones correspond to distance methods implemented in dist
and
"letremy"
is the distance of the original implementation by Patrick
Letrémy that switches between "maximum"
and "euclidean"
during
the training.
Value
an object of class myGrid
with the following entries:
coord
2-column matrix with x and y coordinates of the grid unitstopo
topology of the grid;dim
dimensions of the grid (width corresponds to x coordinates)dist.type
distance type that defines the topology of the grid.
Author(s)
Élise Maigné elise.maigne@inrae.fr
Madalina Olteanu olteanu@ceremade.dauphine.fr
Nathalie Vialaneix nathalie.vialaneix@inrae.fr
References
Letrémy P. (2005) Programmes basés sur l'algorithme de Kohonen et dédiés à l'analyse des données. SAS/IML programs for 'korresp'.
See Also
plot.myGrid
for plotting the grid
Examples
initGrid()
initGrid(dimension=c(5, 7), dist.type = "maximum")