cv                    package:gcl                    R Documentation

_N-_f_o_l_d _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:

     A function to do n-fold crossvalidation of a classifier function
     on a data set.

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

     cv(df, mb, eval, fold = 2, seed = NULL, q.only = T, cv.verbose = F, ...)

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

      df: Data set (frame)

      mb: Model builder, must return a function that takes 'df' as
          input and returns a matrix where entry (i,j) is the
          classifiers belief of case i's memebership in class j

    eval: Evaluation function, takes as input classifier generated by
          mb above and data frame 'df'

    fold: How many folds.

    seed: Set random seed to this (for reproducibility)

  q.only: Return evaluation results only.

cv.verbose: If TRUE, output info.

     ...: Passed on.

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

     If 'q.only' is 'TRUE' then the function returns a vector of
     evaluation results. Otherwise it returns a list. 

      cf: The classifiers generated for each fold.

       q: The evaluation results of each classifier on 'df'

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

     Staal A. Vinterbo staal@dsg.harvard.edu

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

     ## Not run: 
     cv(df, gcl, acc.eval)
     ## End(Not run)

