SOM Toolbox Online documentation http://www.cis.hut.fi/projects/somtoolbox/

som_supervised

Purpose

 Creates, initializes and trains a supervised SOM by taking the 
 class-identity into account.

Syntax

Description

 Creates, initializes and trains a supervised SOM. It constructs the
 training data by adding 1-of-N -coded matrix to the original data
 based on the class information in the .labels field. The dimension
 of vectors after the process is (the old dimension + number of
 different classes). In each vector, one of the new components has
 value '1' (this depends on the class of the vector), and others '0'.
 Calls SOM_MAKE to construct the map. Then the class of each map unit
 is determined by taking maximum over these added components, and a
 label is give accordingly. Finally, the extra components (the
 1-of-N -coded ones) are removed.

References

 Kohonen, T., "Self-Organizing Map", 2nd ed., Springer-Verlag, 
    Berlin, 1995, pp. 160-161.
 Kohonen, T., Mäkivasara, K., Saramäki, T., "Phonetic Maps - 
    Insightful Representation of Phonological Features For 
    Speech Recognition", In proceedings of International
    Conference on Pattern Recognition (ICPR), Montreal, Canada, 
    1984, pp. 182-185.

Required input arguments

 sData           The data to use in the training.
        (struct) A data struct. '.comp_names' as well as '.name' 
                 is copied to the map. The class information is 
                 taken from the first column of '.labels' field.

Optional input arguments

  argID (string) Argument identifier string (see below).
  value (varies) Value for the argument (see below).

  The optional arguments can be given as 'argID',value -pairs. If an
  argument is given value multiple times, the last one is used. 
  Here are the argument IDs and corresponding values: 
   'munits'     (scalar) the preferred number of map units - this may 
                 change a bit, depending on the properties of the data
   'msize'      (vector) map grid size
   'mask'       (vector) BMU search mask, size dim x 1
   'name'       (string) map name
   'comp_names' (string array / cellstr) component names, size dim x 1
   'tracking'   (scalar) how much to report, default = 1. This parameter 
                 is also passed to the training functions. 
   The following values are unambiguous and can therefore
   be given without the preceeding argument ID:
   'algorithm'  (string) training algorithm: 'seq' or 'batch' (default)
   'mapsize'    (string) do you want a 'small', 'normal' or 'big' map
                 Any explicit settings of munits or msize (or topol) 
                 override this.
   'topol'      (struct) topology struct
   'som_topol','sTopol' = 'topol'
   'lattice'    (string) map lattice, 'hexa' or 'rect'
   'shape'      (string) map shape, 'sheet', 'cyl' or 'toroid'
   'neigh'      (string) neighborhood function, 'gaussian', 'cutgauss',
                 'ep' or 'bubble'

Output arguments

  sMap (struct)  SOM -map struct

Examples

  To simply train a map with default parameters:

   sMap = som_supervised(sData);

  With the optional arguments, the initialization and training can be
  influenced. To change map size, use 'msize', 'munits' or 'mapsize'
  arguments:  

   sMap = som_supervised(D,'mapsize','big'); or 
   sMap = som_supervised(D,'big');
   sMap = som_supervised(D,'munits', 100);
   sMap = som_supervised(D,'msize', [20 10]); 

  Argument 'algorithm' can be used to switch between 'seq' and 'batch'
  algorithms. 'batch' is the default, so to use 'seq' algorithm: 

   sMap = som_supervised(D,'algorithm','seq'); or 
   sMap = som_supervised(D,'seq'); 

  The 'tracking' argument can be used to control the amout of reporting
  during training. The argument is used in this function, and it is
  passed to the training functions. To make the function work silently
  set it to 0.

   sMap = som_supervised(D,'tracking',0); 

See also

som_make Create, initialize and train Self-Organizing map.
som_autolabel Label SOM/data set based on another SOM/data set.