koplsModel               package:kopls               R Documentation

_K-_O_P_L_S _m_o_d_e_l _t_r_a_i_n_i_n_g

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

     Function for training a K-OPLS model. The function constructs a
     predictive regression model for predicting the values of 'Y' by
     using the information in 'K'. The explained variation is separated
     into predictive components, which dimensionality is determined by
     the parameter 'A', and 'Y'-orthogonal components; dimensionality
     determined by the parameter 'nox'.

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

     koplsModel(K, Y, A, nox, preProcK = "mc", preProcY = "mc")

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

       K: Kernel matrix (un-centered); K = <phi(Xtr),phi(Xtr)>

       Y: Response matrix (un-centered/scaled).

       A: Number of predictive components.

     nox: Number of 'Y'-orthogonal components.

preProcK: Pre-processing parameters for the 'K' matrix: 'mc' for
          mean-centering, 'no' for no centering. 

preProcY: Pre-processing parameters for the 'Y' matrix: 'mc' for
          mean-centering, 'uv' for mc + scaling to unit variance, 'pa'
          for mc + Pareto, 'no' for no scaling.

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

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

     List with the following components: 

      Cp: 'Y' loading matrix.

      Sp: Sigma matrix, containing singular values from 'Y''*'K'*'Y'
          used for scaling.

     Sps: Sp^(-1/2).

      Up: 'Y' score matrix.

      Tp: Predictive score matrix for all 'Y'-orthogonal components.

       T: Predictive score matrix for the final 'Y'-orthogonal
          component model.

      co: 'Y'-orthogonal loading vectors.

      so: Eigenvalues from estimation of 'Y'-orthogonal loading
          vectors.

      To: 'Y'-orthogonal score matrix.

  toNorm: Norm of the 'Y'-orthogonal score matrix prior to scaling. 

      Bt: T-U regression coefficients for predictions.

       A: Number of predictive components.

     nox: Number of 'Y'-orthogonal components.

       K: The kernel matrix.

 EEprime: The deflated kernel matrix for residual statistics. 

 sstot_K: Total sums of squares in 'K' 

     R2X: Cumulative explained variation for all model components.

    R2XO: Cumulative explained variation for 'Y'-orthogonal model
          components.

    R2XC: Explained variation for predictive model components after
          addition of 'Y'-orthogonal model components.

 sstot_Y: Total sums of squares in 'Y'.

     R2Y: Explained variation of 'Y'.

 preProc: Pre-processing parameters: 

     _K Pre-processing setting for 'K' = 'preProcK'.

     _Y Pre-processing setting for 'Y' = 'preProcY'.

     _p_a_r_a_m_s_Y Scaling parameters for 'Y'. 

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

     Max Bylesjo and Mattias Rantalainen

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

     Rantalainen M, Bylesjo M, Cloarec O, Nicholson JK, Holmes E and
     Trygg J. *Kernel-based orthogonal projections to latent structures
     (K-OPLS)*, _J Chemometrics_ 2007; 21:376-385.
     doi:10.1002/cem.1071.

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

     ## Load data set
     data(koplsExample)

     ## Define kernel function parameter
     sigma<-25

     ## Define number of Y-orthogonal components
     nox<-3

     ## Construct kernel
     Ktr<-koplsKernel(Xtr,NULL,'g',sigma)

     ## Model 
     model<-koplsModel(Ktr,Ytr,1,nox,'mc','mc');

     ## Visualize results
     koplsPlotModelDiagnostics(model)
     title("Model diagnostics without cross-validation")

