cvtype               package:CVThresh               R Documentation

_G_e_n_e_r_a_t_i_n_g _t_e_s_t _d_a_t_a_s_e_t _i_n_d_e_x _f_o_r _c_r_o_s_s-_v_a_l_i_d_a_t_i_o_n

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

     This function generates test dataset index for cross-validation.

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

     cvtype(n, cv.bsize=1, cv.kfold, cv.random=TRUE)

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

       n: the number of observation

cv.bsize: block size of cross-validation

cv.kfold: the number of fold of cross-validation

cv.random: whether or not random cross-validation scheme should be
          used. Set cv.random=TRUE for random cross-validation scheme

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

     This function provides index of test dataset according to various
     cross-validation scheme. One may construct K test datasets in a
     way that each testset consists of blocks of b consecutive data.
     Set 'cv.bsize = b' for this.  To select each fold at random, set
     'cv.random = TRUE'.

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

     matrix of which row is test dataset index for cross-validation.

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

     'cvwavelet', 'cvimpute.by.wavelet', 'cvwavelet.after.impute'.

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

     # Traditional 4-fold cross-validation for 100 observations
     cvtype(n=100, cv.bsize=1, cv.kfold=4, cv.random=FALSE)
     # Random 4-fold cross-validation with block size 2 for 100 observations
     cvtype(n=100, cv.bsize=2, cv.kfold=4, cv.random=TRUE)

