crossval                package:dprep                R Documentation

_C_r_o_s_s _v_a_l_i_d_a_t_i_o_n _e_s_t_i_m_a_t_i_o_n _o_f _t_h_e _m_i_s_c_l_a_s_s_i_f_i_c_a_t_i_o_n _e_r_r_o_r

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

     Computation of the misclassification error for the  LDA, KNN and
     rpart cllasifiers by cross validation

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

     crossval(data, nparts = 10, method = c("lda", "knn", "rpart"), 
     kvec = 5, repet)

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

    data: The name of the dataset

  nparts: The number of folds in which the dataset is divided. By
          default nparts=10

  method: The name of the classifier to be used: LDA,KNN, Rpart

    kvec: The number of nearest neighbors to be used for the KNN
          classifier

   repet: The number of repetitions

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

     Returns the mean misclassification crossvalidation error of the
     classifier obtained on a given number of repetitions

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

     Edgar Acuna

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

     'cv10log', 'cv10mlp'

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

     #------10-fold crossvalidation error using the LDA classifier---
     data(bupa)
     crossval(bupa,method="lda",repet=10)
     #------5-fold crossvalidation error using the knn classifier---
     data(colon)
     crossval(colon,nparts=5,method="knn",kvec=3,repet=5)

