Learn R Programming

wccsom (version 1.2.11)

expand: Expand a SOM network

Description

Increases the size of a network by a factor of 2 in both x and y directions; code vectors for new units are interpolated.

Usage

expand(somnet, plotit=FALSE)

Arguments

somnet
Object of class "wccsom", generated by wccsom.
plotit
If TRUE, plots the new network with the original units coloured white, the new ones red.

Value

Returns the new network.

Details

For hexagonal grids, the six closest units are used for interpolation, weighted by distance; for rectangular grids, the four closest are used.

Examples

Run this code
data(cepha)
gr <- somgrid(3,3, "hexagonal")
set.seed(7)
x <- wccsom(cepha$patterns, grid=gr, trwidth=20, rlen=50)
x2 <- expand(x, plotit=TRUE)

Run the code above in your browser using DataLab