som_topol_struct 
 Purpose 
 Default values for map topology and training parameters.
 Syntax 
  sT = som_topol_struct('argID',value,...);
  sT = som_topol_struct(value,...);
 Description 
 This function is used to give sensible values for map topology (ie. map
 size). The topology struct is returned. 
 The topology struct has three fields: '.msize', '.lattice' and
 '.shape'. Of these, default value for '.lattice' is 'hexa' and for
 '.shape' 'sheet'. Only the '.msize' field depends on the optional
 arguments: 'dlen', 'munits' and 'data'.  The value for '.msize' field is
 determined as follows.
 First, the number of map units is determined (unless it is given). A
 heuristic formula of 'munits = 5*sqrt(dlen)' is used to calculate
 it. After this, the map size is determined. Basically, the two biggest
 eigenvalues of the training data are calculated and the ratio between
 sidelengths of the map grid is set to the square root of this ratio. The
 actual sidelengths are then set so that their product is as close to the
 desired number of map units as possible. If the lattice of the grid is
 'hexa', the ratio is modified a bit to take it into account. If the
 lattice is 'hexa' and shape is 'toroid', the map size along the first axis
 must be even.
 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. The valid IDs and corresponding values are listed below. The values 
  which are unambiguous (marked with '*') can be given without the 
  preceeding argID.
  'dlen'         (scalar) length of the training data
  'data'         (matrix) the training data
                *(struct) the training data
  'munits'       (scalar) number of map units
  'msize'        (vector) map size
  'lattice'     *(string) map lattice: 'hexa' or 'rect'
  'shape'       *(string) map shape: 'sheet', 'cyl' or 'toroid'
  'topol'       *(struct) incomplete topology struct: its empty fields 
                          will be given values
  'som_topol','sTopol'    = 'topol'
 Output arguments 
  sT     (struct) The topology struct.
 Examples 
  The most important optional argument for the default topology is 'data'.
  To get a default topology (given data) use:
    sTopol = som_topol_struct('data',D); 
  This sets lattice to its default value 'hexa'. If you want to have a
  'rect' lattice instead: 
    sTopol = som_topol_struct('data',D,'lattice','rect');
     or 
    sTopol = som_topol_struct('data',D,'rect');
  If you want to have (close to) a specific number of map units, e.g. 100: 
    sTopol = som_topol_struct('data',D,'munits',100);
 See also