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:

     If  more than one mapping between classification and truth 
     corresponds to the minimum number of classification errors, only
     one possible set of misclassified observations is returned.

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

     A list with the following two components: 

misclassified: The indexes of the misclassified data points in a
          minimum error mapping between the given classification and
          the given truth. 

errorRate: The errorRate corresponding to a minimum error mapping 
          mapping between the given classification and the given truth. 

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

     C. Fraley and A. E. Raftery (2006). MCLUST Version 3 for R: Normal
     Mixture Modeling and Model-Based Clustering,  Technical Report no.
     504, Department of Statistics, University of Washington.

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

     '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)

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

