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

som_randinit

Purpose

 Initializes a SOM with random values.

Syntax

Description

 Initializes a SOM with random values. If necessary, a map struct
 is created first. For each component (xi), the values are uniformly
 distributed in the range of [min(xi) max(xi)]. 

Required input arguments

  D                 The training data.
           (struct) Data struct. If this is given, its '.comp_names' and 
                    '.comp_norm' fields are copied to the map struct.
           (matrix) data matrix, size dlen x dim

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 valid argument IDs and corresponding values. 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) topology struct
  'som_topol','sTopol'    = 'topol'
  'map'         *(struct) map struct
  'som_map','sMap'        = 'map'

Output arguments

  sMap     (struct) The initialized map struct.

Examples

  sMap = som_randinit(D);
  sMap = som_randinit(D,sMap);
  sMap = som_randinit(D,sTopol);
  sMap = som_randinit(D,'msize',[10 10]);
  sMap = som_randinit(D,'munits',100,'hexa');

See also

som_map_struct Create a map struct.
som_lininit Initialize a map using linear initialization algorithm.
som_make Initialize and train self-organizing map.