wolffd@0: wolffd@0:
wolffd@0:wolffd@0: wolffd@0: net = somtrain{net, options, x) wolffd@0:wolffd@0: wolffd@0: wolffd@0:
net = somtrain{net, options, x)
uses Kohonen's algorithm to
wolffd@0: train a SOM. Both on-line and batch algorithms are implemented.
wolffd@0: The learning rate (for on-line) and neighbourhood size decay linearly.
wolffd@0: There is no error function minimised during training (so there is
wolffd@0: no termination criterion other than the number of epochs), but the
wolffd@0: sum-of-squares is computed and returned in options(8)
.
wolffd@0:
wolffd@0: The optional parameters have the following interpretations. wolffd@0: wolffd@0:
options(1)
is set to 1 to display error values; also logs learning
wolffd@0: rate alpha
and neighbourhood size nsize
.
wolffd@0: Otherwise nothing is displayed.
wolffd@0:
wolffd@0:
options(5)
determines whether the patterns are sampled randomly
wolffd@0: with replacement. If it is 0 (the default), then patterns are sampled
wolffd@0: in order. This is only relevant to the on-line algorithm.
wolffd@0:
wolffd@0:
options(6)
determines if the on-line or batch algorithm is
wolffd@0: used. If it is 1
wolffd@0: then the batch algorithm is used. If it is 0
wolffd@0: (the default) then the on-line algorithm is used.
wolffd@0:
wolffd@0:
options(14)
is the maximum number of iterations (passes through
wolffd@0: the complete pattern set); default 100.
wolffd@0:
wolffd@0:
options(15)
is the final neighbourhood size; default value is the
wolffd@0: same as the initial neighbourhood size.
wolffd@0:
wolffd@0:
options(16)
is the final learning rate; default value is the same
wolffd@0: as the initial learning rate.
wolffd@0:
wolffd@0:
options(17)
is the initial neighbourhood size; default 0.5*maximum
wolffd@0: map size.
wolffd@0:
wolffd@0:
options(18)
is the initial learning rate; default 0.9. This parameter
wolffd@0: must be positive.
wolffd@0:
wolffd@0:
wolffd@0: wolffd@0: net = som(nin, [8, 7]); wolffd@0: options = foptions; wolffd@0: wolffd@0:wolffd@0: wolffd@0: wolffd@0:% Ordering phase wolffd@0: options(1) = 1; wolffd@0: options(14) = 50; wolffd@0: options(18) = 0.9; % Initial learning rate wolffd@0: options(16) = 0.05; % Final learning rate wolffd@0: options(17) = 8; % Initial neighbourhood size wolffd@0: options(15) = 1; % Final neighbourhood size wolffd@0: net2 = somtrain(net, options, x); wolffd@0: wolffd@0:
% Convergence phase wolffd@0: options(14) = 400; wolffd@0: options(18) = 0.05; wolffd@0: options(16) = 0.01; wolffd@0: options(17) = 0; wolffd@0: options(15) = 0; wolffd@0: net3 = somtrain(net2, options, x); wolffd@0:
kmeans
, som
, somfwd
Copyright (c) Ian T Nabney (1996-9) wolffd@0: wolffd@0: wolffd@0: wolffd@0: