distance.grid: Build a surface that represents prototype distances in a...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Build a regularly sampled surface that represents the distances between prototypes of a fitted Self-Organising Map that are direct neighbours in the prior structure. The surface is generated via the U-matrix principle.

Usage

1
distance.grid(sompdist, mode = c("mean", "full"), nxo, nyo,outer=FALSE)

Arguments

sompdist

an object of class "sompdist" generated by prototype.distances

mode

specifies what distances are taken into account to generate the surface (see Details)

nxo

horizontal resolution of the generated surface

nyo

vertical resolution of the generated surface

outer

specifies whether generated surface is slightly extended by extrapolation outside of the boundaries of the prior structure or not (the default case)

Details

There are two modes for generating the surface, "mean" and "full". In the "mean" mode, the function first computes the mean distance between each prototype and all of its neighbours in the prior structure. Each value is associated to the position of the prototype in the two dimensional prior structure. In the "full" mode, individual distances between neighbouring prototypes are used. Each value is associated to the middle of the segment that links the positions of corresponding prototypes in the prior structure.

Both prior topologies need some specific rules:

"rectangular"

expect for those on the border, each prototype has eight neighbours. Segments linking diagonal neighbours of horizontal or vertical neighbours intersect in their middle. As a consequence, each corresponding intersection is used by two prototype pairs: the associated value is the mean of the distances between the involved prototypes. In other terms, only horizontal and vertical neighbours have exact distances mapped on the surface.

"hexagonal"

hexagonal prior structures are not grids. The function must therefore interpolate the exact surface to evaluate it on a regular grid.

When nxo and/or nyo is specified, the function first computes the original surface and then generates an interpolated surface that is evaluated on a regular grid with nxo vertical lines and nyo horizontal lines (when one of the value is missing, it is generated from the underlying somgrid). The interpolation method is based on Radial Basis Function and on a decomposition of the point set to avoid inverting large linear system. This a simplified version of the algorithm given in the Pouderoux et al. article cited in the References section.

The result of the function uses the conventions of standard surface plotting functions such as persp, contour, filled.contour, etc.

Value

a list with components

x

locations of vertical lines of the grid

y

locations of horizontal lines of the grid

z

the value of the surface at the nodes of the grid

Author(s)

Fabrice Rossi

References

Ultsch, A. and Siemon, H. P. (1990) Kohonen's self organizing feature maps for exploratory data analysis, in: Proceedings of International Neural Network Conference (INNC'90).

Pouderoux, J., Tobor, I., Gonzato, J.C. and Guitton, P. (2004) Adaptive hierarchical RBF interpolation for creating smooth digital elevation models, in: Proceedings of the Twelfth ACM International Symposium on Advances in Geographical Information System 2004, page 232–240.

See Also

See prototype.distances for computing the distances. See plot.sompdist and umatrix for a simpler visualisation of the same data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(iris)
# scaling
data <- scale(iris[1:4])

# a large hexagonal grid
sg <- somgrid(xdim=15,ydim=15,topo="hex")

# fit the SOM
som <- batchsom(data,sg)

# compute prototype distances
pdist <- prototype.distances(som)

# display them via interpolation
pdist.grid <- distance.grid(pdist,mode="mean",nxo=30,nyo=30)

# and contour lines
filled.contour(pdist.grid)

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