bea                  package:multiv                  R Documentation

_B_o_n_d _E_n_e_r_g_y _A_l_g_o_r_i_t_h_m

_D_e_s_c_r_i_p_t_i_o_n:

     Permutes  rows  and columns of an array, in order to maximize
     proximity of large-valued array elements.

_U_s_a_g_e:

     bea(a, istart = 0, jstart = 0)

_A_r_g_u_m_e_n_t_s:

       a: data matrix to be analyzed.  The rows could represent
          observations and the columns variables (a two-way, two-mode
          array); or the rows and columns could both represent
          observations (a two-way, one-mode array).  Missing values are
          not supported. 

  istart: sequence number of first row to be placed; if not specified,
          then a row is  arbitrarily chosen. 

  jstart: sequence number of first column to be placed; if not
          specified, then a row is arbitrarily chosen. 

_V_a_l_u_e:

     list describing the reordering carried out:

       b: row and column permuted array. 

      ib: permutation of rows. 

      jb: permutation of columns. 

       e: `bond energy' of the permuted matrix, `b'. 

_N_o_t_e:

     This is a `non-destructive' approach to analyzing data, insofar as
     the  original data is not altered; it is only rearranged, in order
     to highlight potentially interesting aspects of the data. 
     Subsequent runs of this  routine may improve the bond energy (see
     example below).

_M_e_t_h_o_d:

     A row is arbitrarily placed; then rows are positioned one by one. 
     When this is completed, the columns are treated similarly.  The
     overall procedure  amounts to two approximate traveling salesman
     problems, - one on the rows and  one on the columns.  The
     so-called `best insertion' strategy is used: rows  (or columns)
     are inserted into the current permuted list of rows (or columns).

     To have repeatable results, control the random number generator
     used for the initial selection of rows and columns with the
     `set.seed' command, before calling the `bea' function.  

     No methods are currently defined for the objects produced by the
     `bea' function.

_B_a_c_k_g_r_o_u_n_d:

     This simple method has been used in operations research,
     production  engineering, marketing, and various other fields. 
     Arabie and Hubert (1990) recommend that it be used with ratio
     scale data; and they question its use  with non-binary data if the
     objective is to find a seriation or  one-dimensional ordering of
     rows and columns.

_R_e_f_e_r_e_n_c_e_s:

     W.T. McCormick, P.J. Schweitzer and T.W. White,  `Problem
     decomposition and data reorganization by a clustering technique', 
     Operations Research,  vol. 20, pp. 993-1009, Sept./Oct. 1972.

     P. Arabie and L.J. Hubert,  `The bond energy algorithm revisited',
      IEEE Transactions on Systems, Man, and Cybernetics,  vol. 20, pp.
     268-274, 1990.

     P. Arabie, S. Schleutermann, J. Daws and L. Hubert,  `Marketing
     applications of sequencing and partitioning of nonsymmetric 
     and/or two-mode matrices',  in W. Gaul and M. Schader, Eds.,  Data
     Analysis, Decision Support, & Expert Knowledge Representation in 
     Marketing, Springer Verlag, 1988, pp. 215-224.

_E_x_a_m_p_l_e_s:

     data(USArrests)
     USArrests <- as.matrix(USArrests)
     run1 <- bea(USArrests)
     # look at energy:
     run1$e
     # Redo, on basis of first run, to see if energy increases:
     run2 <- bea(run1$b)
     run2$e
     # Remark: to have repeatable results, issue the `set.seed' before the `bea'
     # command.  Now, reorder the rows and the columns once more:
     run3 <- bea(run2$b)
     run3$e
     # Of course, sequencing of rows and columns of each run is relative to 
     # the array which was input.  Get `net' ordering of rows after third run:
     run1$ib[run2$ib[run3$ib]]
     # Plot the output as images:
     image(1:nrow(USArrests), 1:ncol(USArrests), USArrests)
     image(1:nrow(USArrests), 1:ncol(USArrests), bea(USArrests)$b)
     # Remark: one could split the screen, and use color in such displays of
     # the data.

