SOM                  package:class                  R Documentation

_S_e_l_f-_O_r_g_a_n_i_z_i_n_g _M_a_p_s: _O_n_l_i_n_e _A_l_g_o_r_i_t_h_m

_D_e_s_c_r_i_p_t_i_o_n:

     Kohonen's Self-Organizing Maps are a crude form of
     multidimensional scaling.

_U_s_a_g_e:

     SOM(data, grid = somgrid(), rlen = 10000, alpha, radii, init)

_A_r_g_u_m_e_n_t_s:

    data: a matrix or data frame of observations, scaled so that
          Euclidean distance is appropriate. 

    grid: A grid for the representatives: see 'somgrid'. 

    rlen: the number of updates: used only in the defaults for 'alpha'
          and 'radii'. 

   alpha: the amount of change: one update is done for each element of
          'alpha'. Default is to decline linearly from 0.05 to 0 over
          'rlen' updates. 

   radii: the radii of the neighbourhood to be used for each update:
          must be the same length as 'alpha'.  Default is to decline
          linearly from 4 to 1 over 'rlen' updates. 

    init: the initial representatives.  If missing, chosen (without
          replacement) randomly from 'data'. 

_D_e_t_a_i_l_s:

     'alpha' and 'radii' can also be lists, in which case each
     component is used in turn, allowing two- or more phase training.

_V_a_l_u_e:

     an object of class '"SOM"' with components

    grid: the grid, an object of class '"somgrid"'. 

   codes: a matrix of representatives. 

_R_e_f_e_r_e_n_c_e_s:

     Kohonen, T. (1995) _Self-Organizing Maps._ Springer-Verlag

     Kohonen, T., Hynninen, J., Kangas, J. and Laaksonen, J. (1996)
     _SOM PAK: The self-organizing map program package._ Laboratory of
     Computer and Information Science, Helsinki University of
     Technology, Technical Report A31.

     Ripley, B. D. (1996) _Pattern Recognition and Neural Networks._
     Cambridge.

     Venables, W. N. and Ripley, B. D. (2002) _Modern Applied
     Statistics with S._ Fourth edition.  Springer.

_S_e_e _A_l_s_o:

     'somgrid', 'batchSOM'

_E_x_a_m_p_l_e_s:

     data(crabs, package = "MASS")

     lcrabs <- log(crabs[, 4:8])
     crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, rep(50,4))])
     gr <- somgrid(topo = "hexagonal")
     crabs.som <- SOM(lcrabs, gr)
     plot(crabs.som)

     ## 2-phase training
     crabs.som2 <- SOM(lcrabs, gr,
         alpha = list(seq(0.05, 0, len = 1e4), seq(0.02, 0, len = 1e5)),
         radii = list(seq(8, 1, len = 1e4), seq(4, 1, len = 1e5)))
     plot(crabs.som2)

