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
          observations  corresponding to noise. 

     ...: Provided to allow lists with elements other than the
          arguments can be passed in indirect or list calls with
          '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
     order of appearance in the 'classification'. If a 'noise' value of
     symbol is designated, the corresponding indicator variables are
     located in the last column of the matrix.

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

     C. Fraley and A. E. Raftery (2002a). Model-based clustering,
     discriminant analysis, and density estimation. _Journal of the
     American Statistical Association 97:611-631_.  See <URL:
     http://www.stat.washington.edu/mclust>. 

     C. Fraley and A. E. Raftery (2002b). MCLUST:Software for
     model-based clustering, density estimation and  discriminant
     analysis. Technical Report, Department of Statistics, University
     of Washington.  See <URL: http://www.stat.washington.edu/mclust>.

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

     'map', 'estep', 'me'

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

     data(iris)
     irisMatrix <- as.matrix(iris[,1:4])
     irisClass <- iris[,5]
       
     z <- unmap(irisClass)
     z
       
     emEst <- me(modelName = "VVV", data = irisMatrix, z = z)
     emEst$z
       
     map(emEst$z)

