som.nn.do.train: Work hourse for hexagonal som training

Description Usage Arguments Value

View source: R/som.nn.do.train.R

Description

The function is called by som.nn.train and som.nn.continue to train self-organising map with hexagonal tolology.

Usage

1
2
3
som.nn.do.train(x, class.idx, kernel = "internal", xdim, ydim, toroidal, len,
  alpha, radius = 0, norm, norm.center, norm.scale, dist.fun, max.dist, name,
  continue, len.total, codes)

Arguments

x

data.fame with training data. Samples are requested as rows and taken randomly for the training steps. All columns except of the class lables are considered to be attributes and parts of the training vector. One column is needed as class labels. The column with class lables is selected by the argument class.col. If class is not given, the first column is used as class labels.

class.idx

index of the column with as class labels (after beeing coerced to character).

kernel

kernel to be used for training.

xdim

dimension in x-direction.

ydim

dimension in y-direction.

toroidal

logical; if TRUE an endless som is trained as on the surface of a torus.

len

number of steps to be trained (steps - not epochs!).

alpha

initial training rate.

radius

inital radius for SOM training. Gaussian distance function is used, radius corresponds to sigma.

norm

logical; if TRUE, input data is normalised with scale(x, TRUE, TRUE).

dist.fun

parameter for k-NN prediction. Function is used to calculate distance-dependent weights. Any distance function must accept the two parameters x (distance) and sigma (maximum distance to give a weight > 0.0).

max.dist

parameter for k-NN prediction. Parameter sigma for dist.fun. In order to avoid rounding issues, it is recommended not to use exact integers as limit, but values like 1.1 to make sure, that all neurons with distance 1 are included.

name

name for the model. Name will be stored as slot model@name in the trained model.

continue

logical; if TRUE, the codebook vectors of the model, given in argument model will be used as initial codes.

len.total

number of previuos training steps.

model

model of type SOMnn.

Value

S4 object of type SOMnn with the trained model


som.nn documentation built on May 2, 2019, 8:26 a.m.