mapClass               package:mclust               R Documentation

_C_o_r_r_e_s_p_o_n_d_e_n_c_e _b_e_t_w_e_e_n _c_l_a_s_s_i_f_i_c_a_t_i_o_n_s.

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

     Best correspondence between classes given two vectors viewed as
     alternative classifications of the same object.

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

     mapClass(a, b)

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

       a: A numeric or character vector of class labels. 

       b: A numeric or character vector of class labels. Must have the
          same length as 'a'. 

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

     A list with two named elements,  'aTOb' and  'bTOa' which are
     themselves lists.  The 'aTOb' list has a component corresponding
     to each unique element of 'a', which gives the element or elements
     of 'b'  that result in the closest class correspondence.

     The 'bTOa' list has a component corresponding to each unique
     element of 'b', which gives the element or elements of 'a'  that
     result in the closest class correspondence.

_S_e_e _A_l_s_o:

     'mapClass', 'classError', 'table'

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

     a <- rep(1:3, 3)
     a
     b <- rep(c("A", "B", "C"), 3)
     b
     mapClass(a, b)
     a <- sample(1:3, 9, replace = TRUE)
     a
     b <- sample(c("A", "B", "C"), 9, replace = TRUE)
     b
     mapClass(a, b)

