pls.lda.cv            package:plsgenomics            R Documentation

_D_e_t_e_r_m_i_n_a_t_i_o_n _o_f _t_h_e _n_u_m_b_e_r _o_f _l_a_t_e_n_t _c_o_m_p_o_n_e_n_t_s _t_o _b_e _u_s_e_d _f_o_r
_c_l_a_s_s_i_f_i_c_a_t_i_o_n _w_i_t_h _P_L_S _a_n_d _L_D_A

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'pls.lda.cv' determines the best number of latent
     components to be used for classification with PLS dimension
     reduction and linear discriminant analysis as described in
     Boulesteix (2004).

_U_s_a_g_e:

     pls.lda.cv(Xtrain, Ytrain,  ncomp, nruncv=20, alpha=2/3, priors=NULL)

_A_r_g_u_m_e_n_t_s:

  Xtrain: a (ntrain x p) data matrix containing the predictors for the
          training data set. 'Xtrain' may be a matrix or a data frame.
          Each row is an observation and each column is a  predictor
          variable.

  Ytrain: a vector of length ntrain giving the classes of the ntrain
          observations. The classes must be coded as 1,...,K (K>=2).

   ncomp: the vector of integers from which the best number of latent 
          components has to be chosen by cross-validation. If 'ncomp'
          is of length 1, the best number of components is chosen from 
          1,...,'ncomp'.

  nruncv: the number of cross-validation iterations to be performed for
          the choice of the number of latent components.

   alpha: the proportion of observations to be included in the training
          set at each cross-validation iteration.

  priors: The class priors to be used for linear discriminant analysis.
          If unspecified, the class proportions in the training set are
          used. 

_D_e_t_a_i_l_s:

     The cross-validation procedure described in Boulesteix (2004) is
     used to determine the best number of latent components to be used
     for classification. At each cross-validation run, 'Xtrain' is
     split into a pseudo training set and a pseudo test set and the
     classification error rate is determined for each number of latent
     components. Finally, the function 'pls.lda.cv' returns the number
     of latent components for which the mean classification rate over
     the 'nrun' partitions is minimal.

_V_a_l_u_e:

     The number of latent components to be used for classification.

_A_u_t_h_o_r(_s):

     Anne-Laure Boulesteix (<URL:
     http://www.statistik.lmu.de/~socher/>)

_R_e_f_e_r_e_n_c_e_s:

     A. L. Boulesteix (2004). PLS dimension reduction for
     classification with microarray data, Statistical Applications in
     Genetics and Molecular Biology *3*, Issue 1, Article 33.

     S. de Jong (1993). SIMPLS: an alternative approach to partial
     least squares  regression, Chemometrics Intell. Lab. Syst. *18*,
     251-263.

_S_e_e _A_l_s_o:

     'pls.lda', 'pls.regression.cv'.

_E_x_a_m_p_l_e_s:

     # load plsgenomics library
     library(plsgenomics)

     # load leukemia data
     data(leukemia)

     # Determine the best number of components to be used for classification using the cross-validation procedure
     # choose the best number from 2,3,4
     pls.lda.cv(Xtrain=leukemia$X,Ytrain=leukemia$Y,ncomp=2:4,nruncv=20)
     # choose the best number from 1,2,3
     pls.lda.cv(Xtrain=leukemia$X,Ytrain=leukemia$Y,ncomp=3,nruncv=20)

