unmap                 package:mclust                 R Documentation

_I_n_d_i_c_a_t_o_r _V_a_r_i_a_b_l_e_s _g_i_v_e_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:

     Converts a classification into a matrix of indicator variables.

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

       unmap(classification, noise, ...)

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

classification: A numeric or character vector. Typically the distinct
          entries of this vector would represent a classification of
          observations in a data set. 

   noise: A single numeric or character value used to indicate the
          value of 'classification' corresponding to noise. 

    ... : Catches unused arguments in indirect or list calls via
          'do.call'. 

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

     An _n_ by _m_ matrix of _(0,1)_ indicator variables, where _n_ is
     the length of 'classification' and _m_ is the number of unique
     values or symbols in  'classification'.  Columns are labeled by
     the unique values in 'classification',  and the '[i,j]'th entry is
     _1_ if 'classification[i]'  is the _j_th unique value or symbol in
     sorted order  'classification'.  If a 'noise' value of symbol is
     designated, the corresponding indicator  variables are relocated
     to the last column of the matrix.

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

     C. Fraley and A. E. Raftery (2002). Model-based clustering,
     discriminant analysis, and density estimation. _Journal of the
     American Statistical Association 97:611-631_. 

     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:

     'map', 'estep', 'me'

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

     z <- unmap(iris[,5])
     z[1:5, ]
       
     emEst <- me(modelName = "VVV", data = iris[,-5], z = z)
     emEst$z[1:5,]
       
     map(emEst$z)

