classError              package:mclust              R Documentation

_C_l_a_s_s_i_f_i_c_a_t_i_o_n _e_r_r_o_r.

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

     Error for a given classification relative to a known truth. 
     Location of errors in a given classification relative to a known
     truth.

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

     classError(classification, truth)

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

classification: A numeric or character vector of class labels. 

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

_D_e_t_a_i_l_s:

     'classErrors' will only return one possibility if more than one
     mapping between classification and truth results in the minimum
     error.

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

     'classError' gives the fraction of elements  misclassified for
     'classification' relative to 'truth'.  'classErrors' is a logical
     vector of the same length as 'classification' and 'truth' which
     gives the location of misclassified elements in 'classification'
     relative to 'truth'.

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

     'compareClass', 'mapClass', 'table'

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

     a <- rep(1:3, 3)
     a
     b <- rep(c("A", "B", "C"), 3)
     b
     classError(a, b)
     classErrors(a, b)

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

