pop                   package:amap                   R Documentation

_O_p_t_i_m_a_l _P_a_r_t_i_t_i_o_n (_c_l_a_s_s_i_f_i_c_a_t_i_o_n).

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

     Classification: Computing an Optimal Partition from Weighted
     Categorical Variables or from an Array of Signed Similarities.

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

     pop(x,fmbvr=TRUE,triabs=TRUE,allsol=TRUE)

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

       x: A dissimilarity matrix

   fmbvr: Logical, TRUE: look for the exact solution

  triabs: Logical, TRUE: try to init with absolute values

  allsol: Logical, TRUE all solutions, FALSE only one solution

_A_u_t_h_o_r(_s):

     Michel Petitjean, <URL:
     http://petitjeanmichel.free.fr/itoweb.petitjean.class.html>

     R port by Antoine Lucas, <URL:
     http://mulcyber.toulouse.inra.fr/projects/amap/>

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

     Theory is explained at <URL:
     http://petitjeanmichel.free.fr/itoweb.petitjean.class.html>

     Marcotorchino F. _Agr\'egation des similarit\'es en classification
     automatique._ Th\'ese de Doctorat d'Etat en Math\'ematiques,
     Universit\'e Paris VI, 25 June 1981.

     Petitjean M. _Agr\'egation des similarit\'es: une solution
     oubli\'ee._ RAIRO Oper. Res. 2002,36[1],101-108.

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

     ## pop from a data matrix
     data <-
     matrix(c(1,1,1,1,1
             ,1,2,1,2,1
             ,2,3,2,3,2
             ,2,4,3,3,2
             ,1,2,4,2,1
             ,2,3,2,3,1),ncol=5,byrow=TRUE)


     pop(diss(data))

     ## pop from a dissimilarity matrix

     d <-2 * matrix(c(9,  8,  5,  7,  7,  2
     ,  8,  9,  2,  5,  1,  7
     ,  5,  2,  9,  8,  7,  1
     ,  7,  5,  8,  9,  3,  2
     ,  7,  1,  7,  3,  9,  6
     ,  2,  7,  1,  2,  6,  9),ncol=6,byrow=TRUE) - 9

     pop(d)

     ## Not run: 
     d <- 2 * matrix(c(57, 15, 11, 32,  1, 34,  4,  6, 17,  7
     , 15, 57, 27, 35, 27, 27, 20, 24, 30, 15
     , 11, 27, 57, 25, 25, 20, 34, 25, 17, 15
     , 32, 35, 25, 57, 22, 44, 13, 22, 30, 11
     ,  1, 27, 25, 22, 57, 21, 28, 43, 20, 13
     , 34, 27, 20, 44, 21, 57, 18, 27, 21,  8
     ,  4, 20, 34, 13, 28, 18, 57, 31, 28, 13
     ,  6, 24, 25, 22, 43, 27, 31, 57, 30, 15
     , 17, 30, 17, 30, 20, 21, 28, 30, 57, 12
     ,  7, 15, 15, 11, 13,  8, 13, 15, 12, 57),ncol=10,byrow=TRUE) - 57

     pop(d)

     ## End(Not run)

