batchSOM package:class R Documentation _S_e_l_f-_O_r_g_a_n_i_z_i_n_g _M_a_p_s: _B_a_t_c_h _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: batchSOM(data, grid = somgrid(), 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'. radii: the radii of the neighbourhood to be used for each pass: one pass is run for each element of 'radii'. init: the initial representatives. If missing, chosen (without replacement) randomly from 'data'. _D_e_t_a_i_l_s: The batch SOM algorithm of Kohonen(1995, section 3.14) is used. _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. 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', 'SOM' _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 <- batchSOM(lcrabs, gr, c(4, 4, 2, 2, 1, 1, 1, 0, 0)) plot(crabs.som) bins <- as.numeric(knn1(crabs.som$code, lcrabs, 0:47)) plot(crabs.som$grid, type = "n") symbols(crabs.som$grid$pts[, 1], crabs.som$grid$pts[, 2], circles = rep(0.4, 48), inches = FALSE, add = TRUE) text(crabs.som$grid$pts[bins, ] + rnorm(400, 0, 0.1), as.character(crabs.grp))