Create an empty (square) grid equipped with topology.
an object of class myGrid with the following entries:
coord 2-column matrix with x and y coordinates of the grid
units
topo 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.
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.
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'.
plot.myGrid for plotting the grid
initGrid()
#>
#> Self-Organizing Map structure
#>
#> Features :
#> topology : square
#> x dimension : 5
#> y dimension : 5
#> distance type: euclidean
#>
initGrid(dimension=c(5, 7), dist.type = "maximum")
#>
#> Self-Organizing Map structure
#>
#> Features :
#> topology : square
#> x dimension : 5
#> y dimension : 7
#> distance type: maximum
#>