batcoord                 package:fpc                 R Documentation

_B_h_a_t_t_a_c_h_a_r_y_y_a _d_i_s_c_r_i_m_i_n_a_n_t _p_r_o_j_e_c_t_i_o_n

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

     Computes Bhattacharyya discriminant projection coordinates as
     described in Fukunaga (1990), p. 455 ff.

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

     batcoord(xd, clvecd, clnum=1, dom="mean")
     batvarcoord(xd, clvecd, clnum=1)

_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 or logical vector of class numbers; length must equal
          'nrow(xd)'.

   clnum: integer, one of the values of 'clvecd', if this is an integer
          vector. Bhattacharyya projections can only be computed if
          there are only two classes in the dataset. 'clnum' is the
          number of one of the two classes. All the points indicated by
          other values of 'clvecd' are interpreted as the second class.

     dom: string. 'dom="mean"' means that the discriminant coordinate
          for the group means is computed as the first projection
          direction by 'discrcoord' (option 'pool="equal"'; both
          classes have the same weight for computing the within-class
          covariance matrix). Then the data is projected into a
          subspace orthogonal (w.r.t. the within-class covariance) to
          the discriminant coordinate, and the projection coordinates
          to maximize the differences in variance are computed. 
           'dom="variance"' means that the projection coordinates
          maximizing the difference in variances are computed. Then
          they are ordered with respect to the Bhattacharyya distance,
          which takes also the mean differences into account. Both
          procedures are implemented as described in Fukunaga (1990).

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

     'batvarcoord' computes the optimal projection coordinates with
     respect to the difference in variances. 'batcoord' combines the
     differences in mean and variance as explained for the argument
     'dom'.

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

     'batcoord' returns a list with the components 'ev, rev, units,
     proj'. 'batvarcoord' returns a list with the components 'ev, rev,
     units, proj, W, S1, S2'.  

      ev: vector of eigenvalues. If 'dom="mean"', then first eigenvalue
          from 'discrcoord'. Further eigenvalues are of S_1^{-1}S_2,
          where S_i is the covariance matrix of class i. For
          'batvarcoord' or if 'dom="variance"', all eigenvalues come
          from S_1^{-1}S_2 and are ordered by 'rev'.

     rev: for 'batcoord': vector of projected Bhattacharyya distances
          (Fukunaga (1990), p. 99). Determine quality of the projection
          coordinates. For 'batvarcoord': vector of amount of projected
          difference in variances.

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

       W: matrix S_1^{-1}S_2.

      S1: covariance matrix of the first class.

      S2: covariance matrix of the second class.

_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:

     Fukunaga, K. (1990). _Introduction to Statistical Pattern
     Recognition_ (2nd ed.). Boston: Academic Press.

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

     'plotcluster' for straight forward discriminant plots.

     'discrcoord' for discriminant coordinates.

     '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"))
     bcf2 <- batcoord(face,grface==2)
     plot(bcf2$proj,col=1+(grface==2))
     bcfv2 <- batcoord(face,grface==2,dom="variance")
     plot(bcfv2$proj,col=1+(grface==2))
     bcfvv2 <- batvarcoord(face,grface==2)
     plot(bcfvv2$proj,col=1+(grface==2))

