awcoord                 package:fpc                 R Documentation

_A_s_y_m_m_e_t_r_i_c _w_e_i_g_h_t_e_d _d_i_s_c_r_i_m_i_n_a_n_t _c_o_o_r_d_i_n_a_t_e_s

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

     Asymmetric weighted discriminant coordinates as defined in Hennig
     (2003). Asymmetric discriminant projection means that there are
     two classes, one of which is treated as the homogeneous class
     (i.e., it should appear homogeneous and separated in the resulting
     projection) while the other may be heterogeneous.  The principle
     is to maximize the ratio between the projection of a between
     classes separation matrix and the projection of the covariance
     matrix within the homogeneous class. Points are weighted according
     to their (robust) Mahalanobis distance to the homogeneous class.

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

     awcoord(xd, clvecd, clnum=1, mahal="square", method="classical",
                          clweight=switch(method,classical=FALSE,TRUE),
                          alpha=0.99, subsample=0, countmode=1000, ...) 

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

      xd: the data matrix; a numerical object which can be coerced to a
          matrix.

  clvecd: integer vector of class numbers; length must equal
          'nrow(xd)'.

   clnum: integer. Number of the homogeneous class.

   mahal: "md" or "square". If "md", the points are weighted by the
          square root of the 'alpha'-quantile of the corresponding chi
          squared distribution over the roots of their Mahalanobis
          distance to the homogeneous class, unless this is smaller
          than 1. If "square" (which is recommended), the (originally
          squared) Mahalanobis distance and the unrooted quantile is
          used.

  method: one of "mve", "mcd" or "classical". Covariance matrix used
          within the homogeneous class and for the computation of the
          Mahalanobis distances. "mcd" and "mve" are robust covariance
          matrices as implemented in 'cov.rob'. "classical" refers to
          the classical covariance matrix.

clweight: logical. If 'FALSE', only the points of the heterogeneous
          class are weighted. This, together with 'method="classical"',
          computes AWC as defined in Hennig (2003). If 'TRUE', all
          points are weighted. This, together with 'method="mcd"',
          computes ARC as defined in Hennig (2003).

   alpha: numeric between 0 and 1. The corresponding quantile of the
          chi squared distribution is used for the downweighting of
          points. Points with a smaller Mahalanobis distance to the
          homogeneous class get full weight.

subsample: integer. If 0, all points are used. Else, only a subsample
          of 'subsample' of the points is used.

countmode: optional positive integer. Every 'countmode' algorithm runs
          'awcoord' shows a message.

     ...: no effect

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

     The square root of the homogeneous classes covariance matrix is
     inverted by use of 'tdecomp', which can be expected to give
     reasonable results for singular within-class covariance matrices.

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

     List with the following components 

      ev: eigenvalues in descending order.

   units: columns are coordinates of projection basis vectors. New
          points 'x' can be projected onto the projection basis vectors
          by 'x %*% units'

    proj: projections of 'xd' onto 'units'.

_A_u_t_h_o_r(_s):

     Christian Hennig chrish@stats.ucl.ac.uk <URL:
     http://www.homepages.ucl.ac.uk/~ucakche/>

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

     Hennig, C. (2003) Symmetric, asymmetric, and robust linear
     dimension reduction for classification, submitted, <URL:
     http://stat.ethz.ch/Research-Reports/108.html>.

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

     'plotcluster' for straight forward discriminant plots. 'discrproj'
     for alternatives. 'rFace' for generation of the example data used
     below.

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

       set.seed(4634)
       face <- rFace(600,dMoNo=2,dNoEy=0)
       grface <- as.integer(attr(face,"grouping"))
       awcf <- awcoord(face,grface==1)
       # awcf2 <- ancoord(face,grface==1, method="mcd")
       plot(awcf$proj,col=1+(grface==1))
       # plot(awcf2$proj,col=1+(grface==1))
       # ...done in one step by function plotcluster.

