mahal                  package:emu                  R Documentation

_C_l_a_s_s_i_f_y _u_s_i_n_g _M_a_h_a_l_a_n_o_b_i_s _d_i_s_t_a_n_c_e

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

     Classifies using Mahalanobis distance

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

     mahal(data, train)

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

    data: A vector or matrix of data 

   train: A Gaussian model generated by 'train'.  

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

     The 'model' argument contains the mean and inverse covariance
     matrix (or standard deviation if the data is one-dimensional) for
     each class in the training set as well as the class labels.  This
     function calculates the Mahalanobis distance of each row of 'data'
     from each class mean and assigns the label of the closest mean to
     that row.  The result is a vector of labels corresponding to the
     rows of 'data'.

     The Mahalanobis distance between a data point and a class is the
     Euclidean distance between the point and the class mean devided by
     the covariance matrix for the class.  This means that classes with
     large covariances will  attract data points from a larger area
     than those with small covariances.

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

     A label vector with one element per row of 'data'

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

     O'Shaughnessy, D. Speech Communication (Addison-Wesley: Reading,
     MA. 1987)

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

     train

