annotate toolboxes/FullBNT-1.0.7/nethelp3.3/somtrain.htm @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 <html>
Daniel@0 2 <head>
Daniel@0 3 <title>
Daniel@0 4 Netlab Reference Manual somtrain
Daniel@0 5 </title>
Daniel@0 6 </head>
Daniel@0 7 <body>
Daniel@0 8 <H1> somtrain
Daniel@0 9 </H1>
Daniel@0 10 <h2>
Daniel@0 11 Purpose
Daniel@0 12 </h2>
Daniel@0 13 Kohonen training algorithm for SOM.
Daniel@0 14
Daniel@0 15 <p><h2>
Daniel@0 16 Synopsis
Daniel@0 17 </h2>
Daniel@0 18 <PRE>
Daniel@0 19
Daniel@0 20 net = somtrain{net, options, x)
Daniel@0 21 </PRE>
Daniel@0 22
Daniel@0 23
Daniel@0 24 <p><h2>
Daniel@0 25 Description
Daniel@0 26 </h2>
Daniel@0 27 <CODE>net = somtrain{net, options, x)</CODE> uses Kohonen's algorithm to
Daniel@0 28 train a SOM. Both on-line and batch algorithms are implemented.
Daniel@0 29 The learning rate (for on-line) and neighbourhood size decay linearly.
Daniel@0 30 There is no error function minimised during training (so there is
Daniel@0 31 no termination criterion other than the number of epochs), but the
Daniel@0 32 sum-of-squares is computed and returned in <CODE>options(8)</CODE>.
Daniel@0 33
Daniel@0 34 <p>The optional parameters have the following interpretations.
Daniel@0 35
Daniel@0 36 <p><CODE>options(1)</CODE> is set to 1 to display error values; also logs learning
Daniel@0 37 rate <CODE>alpha</CODE> and neighbourhood size <CODE>nsize</CODE>.
Daniel@0 38 Otherwise nothing is displayed.
Daniel@0 39
Daniel@0 40 <p><CODE>options(5)</CODE> determines whether the patterns are sampled randomly
Daniel@0 41 with replacement. If it is 0 (the default), then patterns are sampled
Daniel@0 42 in order. This is only relevant to the on-line algorithm.
Daniel@0 43
Daniel@0 44 <p><CODE>options(6)</CODE> determines if the on-line or batch algorithm is
Daniel@0 45 used. If it is 1
Daniel@0 46 then the batch algorithm is used. If it is 0
Daniel@0 47 (the default) then the on-line algorithm is used.
Daniel@0 48
Daniel@0 49 <p><CODE>options(14)</CODE> is the maximum number of iterations (passes through
Daniel@0 50 the complete pattern set); default 100.
Daniel@0 51
Daniel@0 52 <p><CODE>options(15)</CODE> is the final neighbourhood size; default value is the
Daniel@0 53 same as the initial neighbourhood size.
Daniel@0 54
Daniel@0 55 <p><CODE>options(16)</CODE> is the final learning rate; default value is the same
Daniel@0 56 as the initial learning rate.
Daniel@0 57
Daniel@0 58 <p><CODE>options(17)</CODE> is the initial neighbourhood size; default 0.5*maximum
Daniel@0 59 map size.
Daniel@0 60
Daniel@0 61 <p><CODE>options(18)</CODE> is the initial learning rate; default 0.9. This parameter
Daniel@0 62 must be positive.
Daniel@0 63
Daniel@0 64 <p><h2>
Daniel@0 65 Examples
Daniel@0 66 </h2>
Daniel@0 67 The following example performs on-line training on a SOM in two stages:
Daniel@0 68 ordering and convergence.
Daniel@0 69 <PRE>
Daniel@0 70
Daniel@0 71 net = som(nin, [8, 7]);
Daniel@0 72 options = foptions;
Daniel@0 73
Daniel@0 74 <p>% Ordering phase
Daniel@0 75 options(1) = 1;
Daniel@0 76 options(14) = 50;
Daniel@0 77 options(18) = 0.9; % Initial learning rate
Daniel@0 78 options(16) = 0.05; % Final learning rate
Daniel@0 79 options(17) = 8; % Initial neighbourhood size
Daniel@0 80 options(15) = 1; % Final neighbourhood size
Daniel@0 81 net2 = somtrain(net, options, x);
Daniel@0 82
Daniel@0 83 <p>% Convergence phase
Daniel@0 84 options(14) = 400;
Daniel@0 85 options(18) = 0.05;
Daniel@0 86 options(16) = 0.01;
Daniel@0 87 options(17) = 0;
Daniel@0 88 options(15) = 0;
Daniel@0 89 net3 = somtrain(net2, options, x);
Daniel@0 90 </PRE>
Daniel@0 91
Daniel@0 92
Daniel@0 93 <p><h2>
Daniel@0 94 See Also
Daniel@0 95 </h2>
Daniel@0 96 <CODE><a href="kmeans.htm">kmeans</a></CODE>, <CODE><a href="som.htm">som</a></CODE>, <CODE><a href="somfwd.htm">somfwd</a></CODE><hr>
Daniel@0 97 <b>Pages:</b>
Daniel@0 98 <a href="index.htm">Index</a>
Daniel@0 99 <hr>
Daniel@0 100 <p>Copyright (c) Ian T Nabney (1996-9)
Daniel@0 101
Daniel@0 102
Daniel@0 103 </body>
Daniel@0 104 </html>