somgrid: Create a prior structure for a self-organising map

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Create a prior structure (a.k.a., a grid) for a self-organising map. In essence this is simple a list of points in two dimensions.

Usage

1
2
3
4
5
somgrid(xdim, ydim, topo = c("rectangular", "hexagonal"),with.dist = TRUE)
## S3 method for class 'somgrid'
print(x, ...)
## S3 method for class 'somgrid'
summary(object, ...)

Arguments

xdim

the horizontal dimension of the grid

ydim

the vertical dimension of the grid

topo

the topology of the grid

with.dist

logical. If TRUE the result object will contain a dist component (see below for details)

x,object

an object of class "somgrid"

...

not used

Value

somgrid returns an object of class "somgrid", a list with components:

pts

a two-column matrix giving locations for the points of the prior structure

dist

if called with with.dist=TRUE, a matrix containing the distances between all pairs of points in the grid

diam

the diameter of the grid, i.e., the largest distance between to points in the grid

size

the number of points of the prior structure, i.e. xdimydim

xdim,ydim,topo

as in the arguments to somgrid

Note

A short description of the prior structure can be obtained via the print or the summary methods. The plot.somgrid method provides graphical representation.

Author(s)

Fabrice Rossi

See Also

plot.somgrid for graphical representation.

Examples

1
2
3
4
5
# display a rectangular grid
plot(somgrid(10,7))

# and a hexagonal one
plot(somgrid(9,11,topo="hexa"))

yasomi documentation built on May 2, 2019, 5:59 p.m.