koplsCenterKTeTr            package:kopls            R Documentation

_C_e_n_t_e_r_i_n_g _f_u_n_c_t_i_o_n _f_o_r _t_h_e _h_y_b_r_i_d _t_e_s_t/_t_r_a_i_n_i_n_g _k_e_r_n_e_l

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

     Centering function for the hybrid test/training kernel, which is
     constructed from the test matrix Xte and the training matrix Xtr
     as KteTr = <phi(Xte), phi(Xtr)>. Requires additional (un-centered)
     training kernel to estimate mean values (see 'koplsKernel' for
     details on constructing a kernel matrix).

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

     koplsCenterKTeTr(KteTr, Ktrain)

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

   KteTr: Hybrid test/training kernel matrix; KteTr = <phi(Xte),
          phi(Xtr)>. 

  Ktrain: Training kernel matrix; Ktrain = <phi(Xtr), phi(Xtr)>. 

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

     The centered test/training kernel matrix.

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

     ## Construct kernels
     Ktr<-koplsKernel(Xtr,NULL,'g',sigma)
     KteTr<-koplsKernel(Xte,Xtr,'g',sigma)

     ## Center kernel
     KteTr_centered<-koplsCenterKTeTr(KteTr, Ktr)

