train                  package:emu                  R Documentation

_T_r_a_i_n _a _G_a_u_s_s_i_a_n _M_o_d_e_l

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

     Trains a Gaussian Model

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

     train(x, lab)

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

       x: A data vector or matrix. 

     lab: A vector of labels parallel to 'x'. If missing, all data is
          assumed to be from the same class. 

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

     This function is used to train a gaussian model on a data set. The
     result can be passed to either the 'mahal' or 'bayes.lab'
     functions to classify either the training set ('x') or a test set
     with the same number of dimensions.  Train simply finds the mean
     and inverse covariance matrix/standard deviation for the data
     corresponding to each unique label in labs.

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

     A structure with the following components: 

   label: The unique labels in 'lab'. 

   means: The means for each dimension per unique label.  

     cov: The combined covariance matrixes for each unique label. The
          matrixes are joined with 'rbind'.  If the input data is
          one-dimensional, this is just the standard deviation of the
          data.  

  invcov: The combined inverse covariance matrixes for each unique
          label. The matrixes are joined with 'rbind'.  If the input
          data is one-dimensional, this is just the reciprocal of the
          standard deviation of the data. 

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

     mahal, bayes.lab, mahalplot, bayes.plot

