koplsPlotCVDiagnostics         package:kopls         R Documentation

_O_v_e_r_v_i_e_w _p_l_o_t _o_f _c_r_o_s_s-_v_a_l_i_d_a_t_i_o_n _r_e_s_u_l_t_s

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

     Produces overview plots of cross-validation results retured from
     the 'koplsCV' function.

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

     koplsPlotCVDiagnostics(model.full, plot.values = FALSE)

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

model.full: The cross-validation model result (see 'koplsCV' ).

plot.values: If TRUE, the exact values will be displayed on the bars as
          text labels. 

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

     Produces 2x2 panels of bar plots, containing the total explained
     variation (R2X), the Y-orthogonal explained variation (R2XO), the
     Y-correlated explained variation (R2XC) and the predicted
     variation from cross-validation (Q2Y).

_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 kernel
     Ktr<-koplsKernel(Xtr,NULL,'g',sigma)

     ## Find optimal number of Y-orthogonal components by cross-validation
     ## The cross-validation tests models with Y-orthogonal components 0 through numYo
     modelCV<-koplsCV(Ktr,Ytr,1,3,nrcv=7,cvType='nfold',preProcK='mc',preProcY='mc',modelType='da')

     ## Visualize results
     koplsPlotCVDiagnostics(modelCV)
     title("Statistics from K-OPLS cross-validation of original data")

